summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* tor-keymgr: Replace from_encodable_cert with validation function.Gabriela Moldovan2025-01-131-15/+5
| | | | | | | | In practice, we won't be able to obtain an `ToEncodableCert` type from an `EncodableItem` cert without validating it first, so we need to collapse `validate` into `from_encodable_cert`. Part of #1768
* Remove semver.md files after 1.3.2 releaseNick Mathewson2025-01-071-3/+0
|
* Bump versions of internal arti crates for Arti 1.3.2Nick Mathewson2025-01-071-11/+11
| | | | | | | | | | | | | The affected crates follow our regular versioning. They all get bumped to 0.26.0. Done with ``` for crate in $(./maint/list_crates |grep '^arti-\|tor-' ); do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'mod-module-files' into 'main'Nick Mathewson2025-01-071-0/+1
|\ | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689
| * clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* | fix: fix typosDimitris Apostolou2025-01-064-4/+4
|/
* Merge branch 'upgrades' into 'main'Nick Mathewson2025-01-061-1/+1
|\ | | | | | | | | Simple dependency upgrades for upcoming release See merge request tpo/core/arti!2685
| * Upgrade to itertools 0.14.0Nick Mathewson2025-01-061-1/+1
| |
* | Run "fixup-features" in preparation for release.Nick Mathewson2025-01-061-1/+2
|/
* tor-keymgr: Replace internal error with keystore corruption error.Gabriela Moldovan2024-12-042-1/+5
| | | | | This replaces a placeholder error with a concrete `KeystoreCorruptionError` variant.
* tor-keymgr: Add tests for ArtiNativeKeystore's handling of certs.Gabriela Moldovan2024-12-041-1/+29
|
* tor-keymgr: Add support for certs in ArtiNativeKeystore::insert().Gabriela Moldovan2024-12-041-5/+8
|
* tor-keymgr: Add support for certs in ArtiNativeKeystore::get().Gabriela Moldovan2024-12-041-8/+36
| | | | | This makes `ArtiNativeKeystore::get` deserialize the keystore item as a cert, if its `KeystoreItemType` is `Cert`.
* tor-keymgr: Add arti native keystore helper for parsing tor certs.Gabriela Moldovan2024-12-042-0/+42
| | | | | We'll soon use this in `ArtiNativeKeystore`'s `Keystore` implementation for parsing certs read from disk.
* tor-keymgr: Add tests for the new cert mgmt functions.Gabriela Moldovan2024-12-041-1/+172
|
* tor-keymgr: s/TestKey/TestItem in tests.Gabriela Moldovan2024-12-041-55/+55
| | | | | We're about to reuse TestKey as our test key "certificate", so let's preemptively rename it to something more fitting.
* tor-keymgr: Add a test certificate specifier to test_utils.Gabriela Moldovan2024-12-041-1/+34
| | | | This is about to be used in a couple of places.
* tor-keymgr: Note some breaking changes in semver.md.Gabriela Moldovan2024-12-041-0/+3
|
* tor-keymgr: s/key/item in error message test.Gabriela Moldovan2024-12-042-2/+2
|
* tor-keymgr: Rename error variant.Gabriela Moldovan2024-12-043-14/+13
|
* tor-keymgr: Remove unused KeyType import.Gabriela Moldovan2024-12-041-1/+1
|
* tor-keymgr: Add KeyMgr::get_or_generate_key_and_cert.Gabriela Moldovan2024-12-041-0/+119
|
* tor-keymgr: Add KeyMgr::get_key_and_cert() (fmt).Gabriela Moldovan2024-12-041-5/+7
|
* tor-keymgr: Add KeyMgr::get_key_and_cert().Gabriela Moldovan2024-12-043-2/+97
|
* tor-keymgr: Remove no-longer-needed explicit link targets.Gabriela Moldovan2024-12-041-2/+2
| | | | | These aren't needed anymore now that `KeySpecifierComponent` is in scope.
* tor-keymgr: Add helper for building certificate ArtiPaths.Gabriela Moldovan2024-12-043-2/+130
| | | | This will be used for looking up certificates in the keystore.
* tor-keymgr: Split some logic out of KeyMgr::get_from_store().Gabriela Moldovan2024-12-041-6/+24
| | | | | We're soon going to need the "raw" version of the function (the one that returns the key as `K::Key`).
* tor-keymgr: Add variants for missing cert/signing key errors.Gabriela Moldovan2024-12-041-0/+8
| | | | | These will be soon be returned by `KeyMgr::{get_key_and_cert,get_or_generate_key_and_cert}`.
* tor-key-forge: Implement EncodableItem for Tor ed25519 certs.Gabriela Moldovan2024-12-041-3/+3
| | | | | This will enable us to store `tor_cert::EncodedEd25519Cert`s in the keystore.
* tor-keymgr: Replace as_ssh_key_data with as_keystore_item (fmt).Gabriela Moldovan2024-12-043-3/+3
|
* tor-keymgr: Replace as_ssh_key_data with as_keystore_item.Gabriela Moldovan2024-12-044-22/+26
|
* tor-key-forge: Replace EncodableItem::key_type() with item_type() (fmt).Gabriela Moldovan2024-12-041-2/+1
|
* tor-key-forge: Replace EncodableItem::key_type() with item_type().Gabriela Moldovan2024-12-042-19/+19
| | | | | This function now returns a `KeystoreItemType`, enabling us to represent certs as `EncodableItem`s.