aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/keystore/arti/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* arti: keys: Add arti keys-rawhjrgrn2025-07-141-2/+8
| | | | | | | | | | | | | | | | | | | * 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: Add cert parse error variant.Gabriela Moldovan2025-01-131-2/+14
| | | | | | | This will soon be used, when we modify the `ArtiNativeKeystore` cert lookup code to actually parse certificates before returning them. Part of #1768
* tor-keymgr: Refactor common fs errors into a separate error enum.Gabriela Moldovan2024-10-081-45/+4
| | | | | | | | This will be reused by other on-disk key stores (such as the C Tor ones we're about to add). I recommend reviewing this commit using `git diff --color-moved=zebra --ignore-space-change`
* Rename tor-keys crate to tor-key-forgeDavid Goulet2024-09-041-1/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* tor-keymgr: Use tor-keys crate and remove dead codeDavid Goulet2024-09-041-2/+2
| | | | | | | | | | | Everything copied in the previous commits to tor-keys is now removed and tor-keys crate is used accross the code. Minor changes to tor-keys to accomodate this change. Part of #1137 Signed-off-by: David Goulet <[email protected]>
* tor-keymgr: Use CheckedDir::metadata() instead of PathBuf::try_exists().Gabriela Moldovan2024-08-081-0/+5
| | | | | We now use `CheckedDir::metadata()` to check if the path exists and is of the correct type.
* tor-keymgr: Correct message for mistrust errorIan Jackson2024-07-101-2/+2
|
* tor-keymgr: Dedupe all the convert functions.Gabriela Moldovan2024-05-071-5/+0
|
* tor-keymgr: Move arti-specific ssh code to arti module.Gabriela Moldovan2024-05-071-1/+1
| | | | | | | | | Some of the types and impls from `key_type/ssh.rs` (such as `UnparsedOpenSshKey`) have nothing to do with `KeyType`, and are only used by the `ArtiNativeKeystore`, so I'm moving them to the `arti` keystore module. The shared ssh-related stuff now lives in the top-level `ssh.rs`.
* tor-keymgr: Use keystore_error_kind() to get the error kind.Gabriela Moldovan2024-01-151-1/+2
| | | | Closes #1215
* tor-keymgr: path errors: Add some xrefsIan Jackson2023-12-071-1/+6
|
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-2/+2
| | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* tor-keymgr: Add an Arti keystore error type for keys with invalid key data.Gabriela Moldovan2023-11-211-0/+5
|
* tor-keymgr: Add a top-level error type.Gabriela Moldovan2023-11-211-0/+6
| | | | | | | | | | | | | Previously, the `tor_keymgr::Error` type was `Box<dyn KeystoreError>`. This forced us to impl `KeystoreError` for any error returned by the keymgr (including those that were not coming from a `Keystore` impl). Now, `tor_keymgr::Error` is an non-exhaustive enum and the `Box<dyn KeystoreError>` opaque error type is only returned from `Keystore` impls The reason we're keeping the `dyn KeystoreError` error type is because it enables `Keystore` implementors to use their own error types. Without it, they would have to choose from our (closed) set of error variants, which may not be suitable for their keystore. See #901.
* tor-keymgr: Inline SshKeyError variants into ArtiNativeKeystoreError.Gabriela Moldovan2023-11-201-2/+29
| | | | An `SshKeyError` *is* an Arti keystore error, so let's unify the two.
* tor-keymgr: Fix broken doc link.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Apply cargo fmt.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Rework the ArtiPath error types.Gabriela Moldovan2023-10-191-6/+5
|
* tor-keymgr: Give KeyType an Unknown variant.Gabriela Moldovan2023-10-191-1/+6
|
* tor-keymgr: Add an error type for invalid key paths.Gabriela Moldovan2023-10-191-1/+29
|
* tor-error: Remove KeystoreFsPermissions variant.Gabriela Moldovan2023-08-081-1/+1
| | | | | | | | According to the `ErrorKind` lumping guidelines, `KeystoreFsPermissions` should be lumped with `FsPermissions`: they represent the same type of error, and their "location" is the same ("Host"). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1315#note_2916455
* keymgr: Rename KeyStore to Keystore globally.Gabriela Moldovan2023-06-291-3/+3
| | | | | We've been capitalizing the "s" in "KeyStore" inconsistently. This `s/KeyStore/Keystore/g` across the codebase.
* keymgr: Implement HasKind for ArtiNativeKeystoreError.Gabriela Moldovan2023-06-281-2/+7
|
* keymgr: Remove AsRef<dyn StdError> trait bound and unneeded impls.Gabriela Moldovan2023-06-261-7/+0
| | | | | | We don't really need the `AsRef<dyn StdError>` impls if we make `StdError` a supertrait of `KeystoreError` (and remove the `AsRef<dyn StdError>` trait bound).
* keymgr: Add the path to ArtiNativeKeystoreError Display impl.Gabriela Moldovan2023-06-261-3/+3
|
* keymgr: Replace Error with Box<dyn KeystoreError>.Gabriela Moldovan2023-06-261-2/+0
| | | | Part of #901
* keymgr: Define an error type for ArtiNativeKeyStore.Gabriela Moldovan2023-06-261-0/+73
Part of #901