summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr
Commit message (Collapse)AuthorAgeFilesLines
...
* | keymgr: Update tests to use the new d-d macro annotation for CTorPaths (fmt)Gabriela Moldovan2026-01-061-1/+3
| |
* | keymgr: Update tests to use the new d-d macro annotation for CTorPathsGabriela Moldovan2026-01-061-28/+14
| |
* | keymgr: Use d-d to generate CTorPath<->KeySpecifier conversionsGabriela Moldovan2026-01-061-26/+54
| |
* | keymgr: Add a CTorKeySpecifier trait (fmt)Gabriela Moldovan2026-01-061-4/+4
| |
* | keymgr: Add a CTorKeySpecifier traitGabriela Moldovan2026-01-062-1/+18
| |
* | keymgr: Make CTorPath more like the client/service specifiers (fmt)Gabriela Moldovan2026-01-064-12/+21
| |
* | keymgr: Make CTorPath more like the client/service specifiersGabriela Moldovan2026-01-065-74/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to see the correspondence between CTorPaths and the HS client/service key specifiers. Initially, I was hoping this would make it easier to write a d-d macro that automatically derives a `CTorPath` variant (e.g. `HsClientDescEncKeypair`) from the KeySpecifier type name (`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can "chop off" name suffixes ("Specifier", in this case). `from_ctor_path()`/`ctor_path()` implementations for converting `CTorPath`s to and from key specifiers.
* | keymgr: Fix some recently broken doc linksGabriela Moldovan2026-01-063-6/+6
| |
* | keymgr: Resolve a handful of clippy warnings (fmt)Gabriela Moldovan2026-01-061-2/+1
| |
* | keymgr: Resolve a handful of clippy warningsGabriela Moldovan2026-01-062-4/+4
| |
* | keymgr: Push error handling into the from_ctor_path() functionsGabriela Moldovan2026-01-062-16/+9
| |
* | keymgr: Replace placeholder errors with CTorPathError (fmt)Gabriela Moldovan2026-01-061-4/+4
| |
* | keymgr: Replace placeholder errors with CTorPathErrorGabriela Moldovan2026-01-063-10/+35
| |
* | keymgr: Remove unused argument in helper function (fmt)Gabriela Moldovan2026-01-061-6/+1
| |
* | keymgr: Remove unused argument in helper functionGabriela Moldovan2026-01-061-3/+1
| | | | | | | | | | Previously, the `arti_path` was needed to build the various `ArtiPath` errors, but that's no longer the case.
* | keymgr: Remove redundant ArtiPath from error contextGabriela Moldovan2026-01-062-21/+6
| | | | | | | | | | The `ArtiPath` is included in the `KeyPathError::Arti` outer error type, so there is no need to include it in `ArtiPathError` too.
* | keymgr: Split out ArtiPathError from KeyPathErrorGabriela Moldovan2026-01-064-20/+32
| | | | | | | | | | This makes the error handling around `KeyPath`s a bit more sensible, IMO, and it will make it easier to extend it for `CTorPath` errors.
* | keymgr: Make describe_via_components() return BugGabriela Moldovan2026-01-061-1/+1
| | | | | | | | This never returns any other type of error.
* | keymgr: Move Unrecognized errors out of KeyPathError (fmt)Gabriela Moldovan2026-01-061-3/+3
| |
* | keymgr: Move Unrecognized errors out of KeyPathErrorGabriela Moldovan2026-01-064-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Out of all the variants in `KeyPathError`, `Unrecognized` is the odd one out, because unlike the others, which are mainly just lower level parsing errors, `Unrecognized` is a higher level error constructed in `KeyMgr::describe()`. `KeyMgr::describe()` now returns an `Option`, because * the failure to describe a user provided `KeyPath` may or may not be an error * previously, `describe()` would only ever return `Ok` or `Err(KeyPathError::Unrecognized)`, which essentially a binary result. Also, `describe()` would never return any of the other `KeyPathError` kinds, which further suggests `Unrecognized` doesn't belong there The `Unrecognized` variant still exists, but is now part of `KeystoreCorruptionError`, (returned from `KeyMgr::validate_entry_integrity()`).
* | keymgr: Fix clippy warning when KeySpecifier is used in tor-keymgrGabriela Moldovan2026-01-061-0/+1
| | | | | | | | | | | | | | | | | | If you try to use this macro within `tor-keymgr` (as we do in the tests), clippy complains about the unreachable catch-all branch for `KeyPath`s (we can't get rid of the catch-all, because outside of `tor-keymgr` KeyPath` is non-exhaustive; but we should probably just go ahead and make `KeyPath` exhaustive at this point, because it's very unlikely it will ever grow new variants).
* | proto: Use describe() unconditionally in validate_entry_integrity()Gabriela Moldovan2026-01-061-12/+5
| | | | | | | | | | `KeyMgr::describe()` now works for `CTorPath`s too, so the key path validation can be the same as for `ArtiPath`s.
* | keymgr: Update test d-d macro with new ctor_path functionsGabriela Moldovan2026-01-061-17/+24
| |
* | keymgr: Specify ctor conversion functions as moduleGabriela Moldovan2026-01-061-9/+13
| | | | | | | | | | | | | | This is similar to `#[serde(with = "...")]`, and feels a bit nicer than having to specify two separate functions for the conversions (because with two separate functions, you *can* technically only specify one of them, which shouldn't be allowed).
* | keymgr: Extend KeySpecifier macro to support CTorPath conversionsGabriela Moldovan2026-01-061-2/+22
| | | | | | | | | | This enables us to implement `KeyMgr::describe()`, which relies on the ability to extract the key specifier of the key from its `KeyPath`.
* | keymgr: Make parse_key_path() only parse ArtiPathsGabriela Moldovan2026-01-061-18/+23
| | | | | | | | | | | | Unlike `ArtiPath`s, C Tor paths don't need to be parsed, because we have a predefined list of allowed C Tor paths (`CTorPath` is an enum with variants for each supported key type).
* | Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-043-10/+0
| | | | | | | | | | | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* | Update to derive-deftly 1.6.0Ian Jackson2025-12-031-1/+1
| | | | | | | | | | | | | | | | | | This has: * Fixes to hygiene spans from the new modules feature, needed for my WIP netdoc encoder derive. * A substantially richer `${error }` construct.
* | Bump all the unstable tor- and arti- crates to 0.37.0.Gabriela Moldovan2025-12-021-15/+15
| | | | | | | | | | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.37.0 done
* | Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2025-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version, but not the dependend-on version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - equix - caret - safelog - retry-error * crates where functional changes were made, but no APIs were added or broken: - hashx - fs-mistrust - futures-copy * crates where APIs were broken (bump minor): None The bumps from this commit were created using this script: ``` PATCH_NF=( oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard equix caret safelog retry-error ) PATCH=" hashx fs-mistrust futures-copy " ./maint/bump_nodep "${PATCH_NF[@]}" for crate in $PATCH; do cargo set-version --bump patch -p $crate; done ```
* | Add `hsc key ctor-migrate` subcommandhjrgrn2025-11-241-0/+4
| |
* | Bump derive-deftly to 1.5.0Ian Jackson2025-11-071-1/+1
| | | | | | | | | | | | | | This has the meta attributes with optional values feature and also hygiene rework for modules. The breaking changes don't break arti.
* | Merge branch 'deftly-1.4' into 'main'opara2025-11-061-1/+1
|\ \ | | | | | | | | | | | | Bump derive-deftly to 1.4.0 See merge request tpo/core/arti!3448
| * | Bump derive-deftly to 1.4.0Ian Jackson2025-11-061-1/+1
| | | | | | | | | | | | | | | | | | This will let us use the new modules feature. There are no breaking changes to beta features in 1.4.0.
* | | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0612-12/+12
|/ / | | | | | | Run maint/add_warning
* | maint: bump minor versions of all published cratesSteven Engler2025-10-291-17/+17
| | | | | | | | | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* | Bump MSRV from 1.85.1 to 1.86Clara Engler2025-10-211-1/+1
| |
* | Merge branch 'arti-relay-rsa-keys' into 'main'wesleyac2025-10-061-4/+4
|\ \ | | | | | | | | | | | | Lay foundations for RSA keys in keystore. See merge request tpo/core/arti!3296
| * | Lay foundations for RSA keys in keystore.Wesley Aptekar-Cassels2025-09-301-4/+4
| | | | | | | | | | | | | | | | | | This currently can't be used due to upstream limitations in the ssh_key crate, which will be removed likely in the next release. In the meantime, we can put in all the groundwork.
* | | release: Bump versions.Wesley Aptekar-Cassels2025-10-021-17/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* / Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
|/ | | | This feature has been removed from nightly, in favor of doc_cfg.
* tor-keymgr: Fix `KeyMgr::list_keystores` descriptionhjrgrn2025-09-221-1/+1
|
* Bump MSRV from 1.85 to 1.85.1Nick Mathewson2025-09-091-1/+1
| | | | Closes #2107
* arti: keys: Add `keys check-integrity` CLI toolhjrgrn2025-09-041-3/+35
|
* Update to derive-deftly 1.3.0Ian Jackson2025-09-021-1/+1
|
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-17/+17
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.
* misc: cleanup now that `_report!` macros support fieldsSteven Engler2025-08-181-1/+1
|
* clippy: fix `clippy::implicit_clone` errorsSteven Engler2025-08-112-2/+2
| | | | | | | | | | | | | | | | | ```text error: implicitly cloning a `String` by calling `to_string` on its dereferenced type --> crates/tor-config/src/lib.rs:109:32 | 109 | V::String(_, s) => s.to_string(), | ^^^^^^^^^^^^^ help: consider using: `s.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone note: the lint level is defined here --> crates/tor-config/src/lib.rs:20:9 | 20 | #![deny(clippy::implicit_clone)] | ^^^^^^^^^^^^^^^^^^^^^^ ```
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-4/+1
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-0715-114/+159
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.