aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/keystore/ctor
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-092-0/+2
| | | | | | | | | | | | 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.
* keymgr: Remove RawKeystoreEntry (fmt)Gabriela Moldovan2026-05-182-4/+4
|
* keymgr: Remove RawKeystoreEntryGabriela Moldovan2026-05-182-5/+6
| | | | | | | | | | | | 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`.
* keymgr: Make CTorPath more like the client/service specifiers (fmt)Gabriela Moldovan2026-01-062-8/+17
|
* keymgr: Make CTorPath more like the client/service specifiersGabriela Moldovan2026-01-062-40/+36
| | | | | | | | | | | | | 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.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-062-2/+2
| | | | Run maint/add_warning
* misc: cleanup now that `_report!` macros support fieldsSteven Engler2025-08-181-1/+1
|
* clippy: fix `clippy::implicit_clone` errorsSteven Engler2025-08-111-1/+1
| | | | | | | | | | | | | | | | | ```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)] | ^^^^^^^^^^^^^^^^^^^^^^ ```
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-073-9/+9
| | | | | | | | | | | | | | 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.
* arti: keys: Add arti keys-rawhjrgrn2025-07-142-30/+73
| | | | | | | | | | | | | | | | | | | * CLI: Add `keys-raw` and subcommand `remove-by-path` * arti: Add `arti::subcommand::raw` for the CLI `keys-raw` * tor-keymgr: Add `ArtiNativeKeystoreError::UnexpectedRawEntry`, `ArtiEphemeralKeystoreError::NotSupported` * tor-keymgr: Add `tor-keymgr::raw` module * tor-keymgr: Add `Keystore::remove_unchecked` * tor-keymgr: Change `Keystore::list` to return `KeystoreEntry` * tor-keymgr: Add field `KeystoreEntry::raw_id` * doc: Update keys.md * doc: Add raw.md * tor-keymgr: BREAKING: `UnrecognizedEntryError::new` associated function is now only accessible within the crate `tor-keymgr` * tor-keymgr: BREAKING: `UnrecognizedEntryId` is renamed to `UnrecognizedEntry` * tor-keymgr: BREAKING: `KeyMgr::list()` and `Keystore::list()` now return `Result<Vec<KeystoreEntryResult<KeystoreEntry>>>`
* tor-keymgr: BREAKING: Refactor API: Keystore::listhjrgrn2025-05-303-63/+221
| | | | | * Change return type `Result<Vec<(KeyPath, KeystoreItemType)>>` if favor of `Result<Vec<StdResult<(KeyPath, KeystoreItemType), UnrecognizedEntryError>>>`
* tor-keymgr: BREAKING: Refactor API: Keystore::insertplaybahn2025-04-022-22/+4
| | | | | | Drop redundant/unused param item_type: &KeystoreItemType from keystore::Keystore::insert. Method now uses param key: &dyn EncodableItem to obtain a KeystoreItemType
* fix: fix typosDimitris Apostolou2025-01-061-1/+1
|
* 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: Replace KeyType with KeystoreItemType (fmt).Gabriela Moldovan2024-12-042-6/+28
|
* tor-keymgr: Replace KeyType with KeystoreItemType.Gabriela Moldovan2024-12-043-44/+50
| | | | | This is part of the work needed to support storing certificates in the keystore (they won't have a `KeyType`, but rather `CertType`).
* tor-key-forge: Rename EncodableKey to EncodableItem.Gabriela Moldovan2024-12-042-4/+4
| | | | | | | | This is the first step in replacing `EncodableKey` with the new `EncodableItem` trait (see doc/dev/keymgr-certificates.md). (this refactoring is split over multiple commits to make reviewing easier)
* tor-keymgr: Add tests for CTorServiceKeystore.Gabriela Moldovan2024-10-081-1/+148
|
* tor-keymgr: Add tests for CTorClientKeystore.Gabriela Moldovan2024-10-081-1/+130
|
* tor-keymgr: Add a keystore for C Tor client keys.Gabriela Moldovan2024-10-082-0/+328
|
* tor-keymgr: Add a keystore for C Tor service keys.Gabriela Moldovan2024-10-082-0/+422