summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr
Commit message (Collapse)AuthorAgeFilesLines
* Version bumps for 2.5.0Nick Mathewson2026-06-301-18/+18
| | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* Merge branch 'msrv-1.91' into 'main'gabi-2502026-06-181-1/+1
|\ | | | | | | | | Bump MSRV to 1.91 See merge request tpo/core/arti!4105
| * Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* | arti, keymgr: s/IDEA/TODOGabriela Moldovan2026-06-171-1/+2
| | | | | | | | | | | | It's better to use "TODO" like we do in the rest of Arti, because otherwise this has a chance of being forgotten (because nobody really greps for "IDEA").
* | arti: subcommands: keys: Rework output of keys listhjrgrn2026-06-171-0/+2
|/
* Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-1012-0/+12
|\ | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086
| * maint: Run maint/add_warning to deny string slicesClara Engler2026-06-0912-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* | Bump derive-deftly to 1.11.3Ian Jackson2026-06-091-1/+1
|/ | | | New beta semver policy means we should pin the patchlevel.
* Remove semver.md files post-releaseGabriela Moldovan2026-06-011-1/+0
|
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-15/+15
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround web-time-compat 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): ``` oneshot-fused-workaround: No change. web-time-compat: No change. slotmap-careful: No change. test-temp-dir: No change. caret: No change. safelog: No change. retry-error: No change. futures-copy: No change. ``` Obtained with: ``` 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): - equix * crates where functional changes were made, but no APIs were broken (bump patch): - fs-mistrust * crates where APIs were broken (bump minor): - hashx - fslock-guard The bumps from this commit were created using this script: ``` PATCH_NF=( equix ) PATCH=" fs-mistrust " MINOR=" hashx fslock-guard " ./maint/bump-nodep "${PATCH_NF[@]}" for crate in $PATCH; do cargo set-version --bump patch -p $crate; done for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'patch-1' into 'main'David Goulet2026-05-282-1/+5
|\ | | | | | | | | feat: Make KeystoreEntry::new() public See merge request tpo/core/arti!3288
| * feat: Make KeystoreEntry::new() publicAaron Dewes2025-09-292-1/+5
| | | | | | | | | | | | | | | | | | | | | | Commit 6958b6c8 changed the way the `Keystore` trait works. The `list` method must now return a `KeystoreEntry`. Before this change, it was essentially impossible to implement keystores outside of `tor-keymgr`. For 3rd party users of the Arti API that want to implement a custom keystore, it became essentially impossible to do so. To make this work again, this commit makes KeystoreEntry::new() public, if the experimental-api feature is enabled.
* | keymgr: Add a TODO about possibly removing RawEntryId::EphemeralGabriela Moldovan2026-05-181-0/+11
| |
* | keymgr: Rephrase the remove_unchecked docs for clarityGabriela Moldovan2026-05-181-5/+5
| |
* | keymgr: Clarify that not all keystores support stringly-typed entry IDsGabriela Moldovan2026-05-181-0/+12
| |
* | keymgr: Remove a couple unused From<> implsGabriela Moldovan2026-05-183-20/+1
| | | | | | | | | | These are unused, and I don't think they're needed by our API users either, since `KeystoreEntryResult` is just a type alias for `Result`.
* | keymgr: Update tests to stop using RawKeystoreEntry (fmt)Gabriela Moldovan2026-05-181-3/+1
| |
* | keymgr: Update tests to stop using RawKeystoreEntryGabriela Moldovan2026-05-182-15/+15
| | | | | | | | `RawKeystoreEntry` no longer exists, so these tests need to be updated.
* | keymgr: Remove RawKeystoreEntry (fmt)Gabriela Moldovan2026-05-184-6/+6
| |
* | keymgr: Remove RawKeystoreEntryGabriela Moldovan2026-05-187-76/+32
| | | | | | | | | | | | | | | | | | | | | | | | I think this adds unnecessary indirection, and it's a bit confusing to have two separate keystore entry types (we have `KeystoreEntry` too). This type exists just to server as a wrapper over the `RawEntryId` of an unrecognized keystore entry, and the `KeystoreId` of the keystore it was found in. This commit folds `RawKeystoreEntry` into `UnrecognizedEntry`, which was previously a thin wrapper over `RawKeystoreEntry`.
* | Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* | release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p arti-client 0.42.0 cargo set-version -p arti-config 0.42.0 cargo set-version -p arti-relay 0.42.0 cargo set-version -p arti-rpc-client-core 0.42.0 cargo set-version -p arti-rpcserver 0.42.0 cargo set-version -p arti-testing 0.42.0 cargo set-version -p arti-ureq 0.42.0 cargo set-version -p tor-async-utils 0.42.0 cargo set-version -p tor-basic-utils 0.42.0 cargo set-version -p tor-bytes 0.42.0 cargo set-version -p tor-cell 0.42.0 cargo set-version -p tor-cert 0.42.0 cargo set-version -p tor-cert-x509 0.42.0 cargo set-version -p tor-chanmgr 0.42.0 cargo set-version -p tor-checkable 0.42.0 cargo set-version -p tor-circmgr 0.42.0 cargo set-version -p tor-config 0.42.0 cargo set-version -p tor-config-path 0.42.0 cargo set-version -p tor-consdiff 0.42.0 cargo set-version -p tor-dirclient 0.42.0 cargo set-version -p tor-dircommon 0.42.0 cargo set-version -p tor-dirmgr 0.42.0 cargo set-version -p tor-dirserver 0.42.0 cargo set-version -p tor-error 0.42.0 cargo set-version -p tor-events 0.42.0 cargo set-version -p tor-general-addr 0.42.0 cargo set-version -p tor-geoip 0.42.0 cargo set-version -p tor-guardmgr 0.42.0 cargo set-version -p tor-hsclient 0.42.0 cargo set-version -p tor-hscrypto 0.42.0 cargo set-version -p tor-hsrproxy 0.42.0 cargo set-version -p tor-hsservice 0.42.0 cargo set-version -p tor-key-forge 0.42.0 cargo set-version -p tor-keymgr 0.42.0 cargo set-version -p tor-linkspec 0.42.0 cargo set-version -p tor-llcrypto 0.42.0 cargo set-version -p tor-log-ratelim 0.42.0 cargo set-version -p tor-memquota 0.42.0 cargo set-version -p tor-memquota-cost 0.42.0 cargo set-version -p tor-netdir 0.42.0 cargo set-version -p tor-netdoc 0.42.0 cargo set-version -p tor-persist 0.42.0 cargo set-version -p tor-proto 0.42.0 cargo set-version -p tor-protover 0.42.0 cargo set-version -p tor-ptmgr 0.42.0 cargo set-version -p tor-relay-crypto 0.42.0 cargo set-version -p tor-relay-selection 0.42.0 cargo set-version -p tor-rpcbase 0.42.0 cargo set-version -p tor-rpc-connect 0.42.0 cargo set-version -p tor-rtcompat 0.42.0 cargo set-version -p tor-rtmock 0.42.0 cargo set-version -p tor-socksproto 0.42.0 cargo set-version -p tor-units 0.42.0
* | release: Bump safelog version to 0.8.2.Wesley Aptekar-Cassels2026-05-061-1/+1
| |
* | tor-cert: Remove the "encode" cargo featureIan Jackson2026-04-291-1/+1
| | | | | | | | This was experimental. Everything gated by it has been stabilised.
* | tor-cert: Ed25519CertBuilder: do builder fn renameIan Jackson2026-04-292-2/+2
| | | | | | | | | | | | Change all call sites. This completes the rename.
* | keymgr: Remove outdated references to derive-adhocGabriela Moldovan2026-04-161-3/+3
| | | | | | | | | | This updates some outdated references from back when `derive-deftly` was called `derive-adhoc`.
* | keymgr: Use CAPS for metasyntactic variables in macroGabriela Moldovan2026-04-161-6/+6
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3891#note_3395849
* | keymgr: Don't require ctor_path attr to be quotedGabriela Moldovan2026-04-162-2/+2
| | | | | | | | This updates a doc and the corresponding test.
* | keymgr: Use unquoted keypair_specifier in testsGabriela Moldovan2026-04-161-1/+1
| |
* | keymgr: Make KeySpecifier take an unquoted keypair_specifierGabriela Moldovan2026-04-161-2/+2
| | | | | | | | This also makes the macro `beta_deftly`.
* | keymgr: Require keypair_specifier to be a typeGabriela Moldovan2026-04-161-1/+1
| | | | | | | | | | | | I want to make all uses of `keypair_specifier` unquoted, so this can't be a `token_stream` (and in fact, `keypair_specifier` was always meant to be a type).
* | keymgr: Update outdated KeySpecifier docGabriela Moldovan2026-04-161-1/+1
| | | | | | | | This attribute is called `keypair_specifier`, not `key_specifier`.
* | keymgr: Fix ephemeral keystore cert encoding bug (fmt)Gabriela Moldovan2026-04-081-6/+3
| |
* | keymgr: Fix ephemeral keystore cert encoding bugGabriela Moldovan2026-04-081-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug that was causing the ephemeral keystore to retrieve certs in a format that couldn't be handled by the `KeyMgr`. This caused all certificate retrievals from `EphemeralKeystore` done via the `KeyMgr` to fail with an internal error. For context, the only supported cert type is `TorEd25519Cert`, which is a pre-encoded certificate (i.e. a type wrapper over a `Vec<u8>`). These certificates are stored as-is by the Arti native keystore (the bytes are written to a file on disk). When retrieving a `TorEd25519Cert`, the Arti keystore uses `parse_certificate_erased()` to parse the cert into a `ParsedEd25519Cert` before returning it as a type-erased `ErasedKey`. This works as intended with the `KeyMgr` retrieval and downcasting logic, which expects the certificate to be returned in the `ParsedCert` format specified in the `ToEncodableCert` implementation. Before this change, the ephemeral keystore, on the other hand, did not play well with the `KeyMgr` when it came to cert retrieval: it would incorrectly store the `KeystoreItem` as-is, and retrieve it as an `ErasedKey` using the `ErasedKey::into_erased()` implementation. This would then cause the `KeyMgr` to fail to downcast the `ErasedKey` to the correct type (because the returned erased item was of a different type than `ParsedCert`). This commit also removes `KeystoreItem::into_erased()`, which was a footgun (because certificates are not actually supposed to be retrieved in the format returned by `CertData::into_erased()`).
* | Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`Ian Jackson2026-04-021-1/+1
| |
* | Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | | | | | There are no breaking changes.
* | Remove semver.md files after releaseIan Jackson2026-03-301-1/+0
| |
* | Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* | Bump versions: patchlevel, with dependenciesIan Jackson2026-03-301-1/+1
| | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with cargo set-version --offline --bump patch -p safelog
* | Plumb web-time-compat/full dependency through everywhere.Ian Jackson2026-03-301-0/+1
| | | | | | | | As generated by maint/fixup-features.
* | tor-keymgr: migrate to web-time-compat.Nick Mathewson2026-03-263-3/+4
| |
* | Fix typosTobias Stoeckmann2026-03-241-2/+4
| | | | | | | | Typos found with codespell
* | keymgr: Remove now-addressed XXXGabriela Moldovan2026-03-171-3/+0
| |
* | keymgr: Fix feature-gating in testsGabriela Moldovan2026-03-171-4/+3
| |
* | keymgr: Lower get() logic into get_from_store()Gabriela Moldovan2026-03-171-13/+15
| | | | | | | | | | | | | | | | | | This moves the logic for retrieving a public key from its corresponding keypair into `get_from_store()`. Fixes a bug which made it impossible to retrieve a public key using the key specifier of its keypair type with any function other than `KeyMgr::get()`.
* | keymgr: Add more tests to reveal the get_*() bug for public keysGabriela Moldovan2026-03-171-1/+65
| | | | | | | | This will be fixed in the next commit.
* | keymgr: Pass the item type to entry_descriptor() (fmt)Gabriela Moldovan2026-03-171-1/+5
| |
* | keymgr: Pass the item type to entry_descriptor()Gabriela Moldovan2026-03-171-4/+4
| | | | | | | | I am about to repurpose this test helper for other item types too.
* | keymgr: Preserve item metadata when converting to TestPublicKey (fmt)Gabriela Moldovan2026-03-171-1/+4
| |