summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-15/+15
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-03-311-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 ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. slotmap-careful: No change. fslock-guard: No change. caret: No change. retry-error: No change. ``` * crates that only have non-functional changes (bump the patch version): - test-temp-dir - equix - fs-mistrust - safelog * crates where APIs were broken (bump minor): - hashx (`RngCore` impl for `SipRand`) The bumps from this commit were created using this script: ``` PATCH=" test-temp-dir equix fs-mistrust safelog " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" hashx " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* tor-keymgr: keystore::arti::ssh: Fix typo; simplify comments.playbahn2025-03-271-8/+7
| | | | Closes #1455
* tor-keymgr: keystore::arti: Rework tests: ssh-keygen interopplaybahn2025-03-261-7/+4
| | | | Closes #1455 [PATCH 4(v3)/4]
* tor-keymgr: keystore::arti::ssh: Rework tests: ssh-keygen interopplaybahn2025-03-261-37/+115
| | | | Part of #1455 [PATCH 3(v3)/4]
* tor-keymgr: test_utils: TestSpecifier::path_prefix: Drop methodplaybahn2025-03-262-8/+7
| | | | Part of #1455
* tor-keymgr: Fix clippy errorsplaybahn2025-03-262-2/+3
|
* tor-keymgr: dep ssh-key feat: -allocplaybahn2025-03-261-1/+1
|
* tor-keymgr: test_utils: Fix unresolved importplaybahn2025-03-261-4/+8
|
* tor-keymgr: keystore::arti::tests: More intuitive assert_eq!playbahn2025-03-262-3/+2
|
* tor-keymgr: keystore::arti: Rework ssh-keygen interop testsplaybahn2025-03-261-63/+82
| | | | Closes #1455 [PATCH 4(v2)/4]
* tor-keymgr: keystore::arti::ssh: Rework ssh-keygen interop testsplaybahn2025-03-261-30/+52
| | | | Part of #1455 [PATCH 3(v2)/4]
* tor-keymgr: Rework utils for ssh-keygen interop testsplaybahn2025-03-261-52/+50
| | | | | | | | | | | Part of #1455 [PATCH 2(v2)/4] - Rework sshkeygen::ed25519_encoded to also work as replacement for sshkeygen::exists - Drop sshkeygen::exists - Rename sshkeygen::{ed25519_encoded -> sshkeygen_ed25519_strings} - Pull out sshkeygen_ed25519_strings from mod sshkeygen - Drop mod sshkeygen
* tor-keymgr: Remove unused importsplaybahn2025-03-262-2/+0
| | | | _sigh_
* tor-keymgr: keystore::arti: Add tests for ssh-keygen interopplaybahn2025-03-261-65/+100
| | | | Closes #1455 [PATCH 4/4]
* tor-keymgr: keystore::arti::ssh: Add tests for ssh-keygen interopplaybahn2025-03-261-0/+61
| | | | | | | | | | | | Part of #1455 [PATCH 3/4] Abstract of the test(s): Encoded (key) A -> Decoded (key) A Decoded A -> Encoded B Encoded B -> Decoded B Assert that Decoded A == Decoded B
* tor-keymgr: test_utils: Add ssh-keygen interop test utilsplaybahn2025-03-261-0/+53
| | | | | | | | | | Part of #1455 [PATCH 2/4] Utils include: - mod sshkeygen - sshkeygen::exists - check if ssh-keygen is available - sshkeygen::ed25519_encoded - generate encoded Ed25519 keys
* tor-keymgr: dependency ssh-key: features: +allocplaybahn2025-03-261-1/+1
| | | | | | Part of #1455 [PATCH 1/4] ssh_key::{PrivateKey, PublicKey}::to_openssh requires feature alloc
* tor-keymgr: test_utils: Fix typo: TestSpecifier::new paramplaybahn2025-03-261-2/+2
| | | | | | | TestSpecifier::new(prefix: ...) -> new(suffix: ...) Prefix is given by TestSpecifier::path_prefix() which returns const TEST_SPECIFIER_PATH = "..."
* tor-keymgr: Introduce ItemMetadata type for testing.vijayabhaskar_782025-03-261-86/+149
|
* Use an EntropicRng trait to enforce key generation rules.Nick Mathewson2025-03-242-8/+13
| | | | | | | | | | | We want to require that whenever we generate a key that's persistent (stored in KeyMgr), it's going to be made from a stronger-than-usual Rng. This trait helps us enforce that. We also add a FakeEntropicRng struct to use for testing. Note that this turned up a case that we'd missed, which required an internal change in tor-hsservice.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-182-2/+2
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | (Per discussion at #1774, we think the changes are acceptable.) This commit won't compile on its own; subsequent commits will fix it.
* Merge branch '1889-resolve-some-todos' into 'main'gabi-2502025-03-142-185/+174
|\ | | | | | | | | | | | | tor-keymgr: Resolve TODOs from key_specifier::tests Closes #1889 See merge request tpo/core/arti!2849
| * tor-keymgr: Resolve TODOs from key_specifier::testshjrgrn2025-03-142-185/+174
| |
* | tor-hscrypto: Implement Display for TimePeriodhjrgrn2025-03-131-10/+1
|/
* Bump minor versions in tor-*, arti-*.Nick Mathewson2025-03-031-14/+14
|
* Merge branch 'keymgr-readme' into 'main'Ian Jackson2025-02-271-4/+8
|\ | | | | | | | | tor-keymgr: Minor README updates See merge request tpo/core/arti!2806
| * tor-keymgr: Update README to mention the experimental features.Gabriela Moldovan2025-02-261-1/+2
| |
| * tor-keymgr: Update README to mention the new C Tor keystores.Gabriela Moldovan2025-02-261-3/+6
| |
* | Upgrade to derive_more 2Nick Mathewson2025-02-262-2/+2
|/ | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
* Enable derive-deftly beta featuresIan Jackson2025-02-121-1/+1
| | | | | | | | Right now this will give us `${Xmeta as ... default ...}`, which may improve things in the future. The Cargo.toml syntax is precisely that from https://docs.rs/derive-deftly/1.0.0/derive_deftly/doc_changelog/index.html#t:beta
* Update to derive-deftly 1.0Ian Jackson2025-02-121-1/+1
| | | | | | | | | This is released now. Prepared with: cargo upgrade -i -p derive-deftly There is some new duplication now I think mostly because pwd-grp uses old derive-deftly.
* Bump minor version of fs-mistrustIan Jackson2025-02-071-1/+1
| | | | Fixes #1841.
* Merge branch 'versions' into 'main'Ian Jackson2025-02-061-15/+15
|\ | | | | | | | | Version bumps for 1.4.0 See merge request tpo/core/arti!2773
| * Version bumps to 0.27.0Ian Jackson2025-02-061-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Release.md. maint/list_crates | grep -P '^tor-|^arti-' | xargs -n1 nailing-cargo -Eu set-version --bump minor -p This completes the version bumps. The report of changed crates, before I started the release work, is: $ maint/changed_crates -v "arti-v$LAST_VERSION" oneshot-fused-workaround: No change. slotmap-careful: No change. test-temp-dir: No change. fslock-guard: No change. hashx: No change. equix: No change. tor-basic-utils: No change. caret: No change. fs-mistrust safelog: No change. retry-error: No change. tor-error tor-general-addr: No change. tor-geoip: No change. tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim: No change. tor-rpcbase tor-memquota: No change. tor-units tor-llcrypto: No change. tor-protover: No change. tor-bytes tor-checkable: No change. tor-cert tor-key-forge tor-hscrypto: No change. tor-socksproto: No change. tor-linkspec: No change. tor-cell: No change. tor-proto tor-netdoc: No change. tor-consdiff: No change. tor-netdir tor-relay-selection: No change. tor-persist tor-chanmgr tor-ptmgr: No change. tor-guardmgr: No change. tor-circmgr tor-dirclient: No change. tor-dirmgr: No change. tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy: No change. tor-relay-crypto arti-client arti-relay arti-rpcserver arti arti-rpc-client-core $
| * fs-mistrust: bump minor version, and in-tree depsIan Jackson2025-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are new features. cargo set-version --offline --bump minor -p fs-mistrust Actually, I have discovered by diffing that some methods now take `&self` where previously they took `self`. This will need a further bump to the fs-mistrust version and a fix to the changelog. I will do that. Filed blocker ticket #1841 for it.
* | Merge branch 'fixup-features' into 'main'Ian Jackson2025-02-061-0/+1
|\ \ | | | | | | | | | | | | Run maint/fixup-features for release See merge request tpo/core/arti!2771
| * | Fix Cargo.toml features formattingIan Jackson2025-02-061-1/+2
| | | | | | | | | | | | Manual line breaks which fixup-features doesn't know how to add.
| * | Add some missing "full" featuresIan Jackson2025-02-061-1/+1
| |/ | | | | | | | | | | | | Precisely the results of maint/fixup-features. Some crates end up with slightly odd formatting, which I will fix in a moment.
* | tor-keymgr: Use @ to annotate internal macro branches.Gabriela Moldovan2025-02-061-3/+3
| |
* | tor-keymgr: Define the test key constants using a macro.Gabriela Moldovan2025-02-062-42/+84
| | | | | | | | Closes #1396
* | tor-keymgr: Rename test constants to match file names.Gabriela Moldovan2025-02-063-30/+30
|/ | | | Part of #1396
* Upgrade to downcast-rs 2Ian Jackson2025-02-051-1/+1
| | | | No code changes needed.
* tor-keymgr: Use ParsedEd25519Cert when decoding certs.Gabriela Moldovan2025-01-133-12/+13
| | | | | | | This helps us get rid of our uses of `KeyUnknownCert`. Needed because `KeyUnknownCert` can't readily be converted back to `EncodedEd25519Cert` (while `ParsedEd25519Cert` *can* -- see the `certs` module from `tor-relay-crypto`).
* tor-keymgr: Fix cert handling tests.Gabriela Moldovan2025-01-133-25/+64
| | | | | | This updates and reenables the cert management tests. Part of #1768
* tor-keymgr: Use Ed25519Cert::decode to parse the certs.Gabriela Moldovan2025-01-133-4/+17
|
* tor-keymgr: Add cert parse error variant.Gabriela Moldovan2025-01-132-2/+15
| | | | | | | This will soon be used, when we modify the `ArtiNativeKeystore` cert lookup code to actually parse certificates before returning them. Part of #1768
* tor-key-forge: Split out ItemType as a separate trait.Gabriela Moldovan2025-01-133-10/+16
| | | | | | | | This is necessary because `ParsedCert`s will not be `EncodableItem`s. This is because we cannot (and don't want to) write certificates that have not yet been validated to the keystore. They do need to be retrievable from the keystore though, so we also change `ErasedKey` to be `Box<dyn ItemType>` instead.
* tor-key-forge: Distinguish between parsed certs and encodable certs.Gabriela Moldovan2025-01-131-8/+9
| | | | | | | | | | | | | | | We need two different types to represent * certs that have been parsed, but not yet validated (`KeyUnknownCert`) * newly generated encodable certs (`EncodedEd25519Cert`) Currently, we don't use `KeyUnknownCert` anywhere, and instead use `EncodedEd25519Cert` to represent "parsed" but not-yet-validated certs. This approach is wrong and relies on a broken (no-op) `EncodedEd25519Cert::from_bytes` implementation. A future commit will address this problem by replacing `EncodedEd25519Cert::from_bytes` with `Ed25519Cert::decode` to actually parse the cert upon retrieving it from the keystore.