summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/dummy.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-keymgr: Make KeyMgr::remove return the removed key.Gabriela Moldovan2024-02-051-1/+1
| | | | Part of #1115
* tor-keymgr: Downgrade a TODO about the dummy API.Gabriela Moldovan2024-02-051-1/+1
|
* tor-keymgr: Make KeyMgr::insert return the old key.Gabriela Moldovan2024-02-051-1/+1
| | | | Part of #1115
* tor-keymgr: Rename KeyInfoExtractor to KeyPathInfoExtractor.Gabriela Moldovan2024-02-051-1/+1
| | | | | | This trait extracts a `KeyPathInfo`, not a `KeyInfo`. Part of #1115
* tor-keymgr: Turn some TODOs into #1115.Gabriela Moldovan2024-01-101-1/+1
|
* tor-keymgr: Call inventory::collect in the dummy keymgr too.Gabriela Moldovan2023-12-051-0/+2
| | | | | Not calling it results in an error (it instantiates the plugin registry for our type).
* Merge branch 'keymgr-derive-builder' into 'main'gabi-2502023-11-281-9/+46
|\ | | | | | | | | | | | | tor-keymgr: Derive Builder for KeyMgr. Closes #1114 See merge request tpo/core/arti!1760
| * tor-keymgr: Write some KeyMgrBuilder functions by hand.Gabriela Moldovan2023-11-281-1/+36
| | | | | | | | | | | | | | Eventually these will need to be auto-generated, but that is not possible right now. Context: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1760#note_2969841
| * tor-keymgr: Abolish KeyMgr::new.Gabriela Moldovan2023-11-271-5/+0
| | | | | | | | We don't use this now that we have a `KeyMgrBuilder`.
| * tor-keymgr: Derive Builder for KeyMgr.Gabriela Moldovan2023-11-271-4/+11
| | | | | | | | | | | | | | `KeyMgr` is soon going to have more fields, so now is a good time to derive `Builder` for it. Closes #1114
* | tor-keymgr: Add a top-level error type.Gabriela Moldovan2023-11-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add some derives for the dummy KeyType.Gabriela Moldovan2023-11-211-0/+1
|/ | | | | | | | We are about to add a top-level `tor_keymgr::Error` enum that has a variant that contains a `KeyType`. The error enum needs to be `Clone`, so we need `KeyType` (both the dummy version and the "real" one, because the `err` module is not cfg'd behind the `keymgr` feature) to be `Clone`.
* Revert "keymgr: Require callers to be explicit about which keystore to get ↵Gabriela Moldovan2023-07-211-1/+1
| | | | | | | | | keys from." This reverts commit 38a6c74c7894dc96b16c9039cacc2a4023977b05. This also updates some tests to make them compile with the reverted version of the code.
* keymgr: Require callers to be explicit about which keystore to get keys from.Gabriela Moldovan2023-07-201-1/+1
|
* keymgr: Require callers to specify which keystore to insert keys in.Gabriela Moldovan2023-07-201-2/+2
| | | | | | | | | | The caller uses `KeystoreSelector` to specify which keystore to insert the new key into (only `KeystoreSelector::Id` and `KeystoreSelector::Default` are supported for `insert`). The ability to insert keys in a particular keystore will come in handy when we implement the key management CLI (the CLI will have an option for specifying the keystore to access/modify).
* keymgr: Explicitly specify the default keystore for `KeyMgr`.Gabriela Moldovan2023-07-201-1/+1
|
* keymgr: Rename KeyStore to Keystore globally.Gabriela Moldovan2023-06-291-7/+7
| | | | | We've been capitalizing the "s" in "KeyStore" inconsistently. This `s/KeyStore/Keystore/g` across the codebase.
* keymgr: Fix dummy keymgr doc links.Gabriela Moldovan2023-06-291-3/+3
| | | | | `Error` is private to `dummy.rs` so let's not mention it in the docs of the public items.
* keymgr: Add missing dummy implementation for KeyType::arti_extension.Gabriela Moldovan2023-06-291-0/+9
| | | | | | | | This fixes a rustdoc warning when building with: ``` cargo doc --locked --offline -p arti --no-default-features --features=full,onion-service-client ```
* 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: Replace Error with Box<dyn KeystoreError>.Gabriela Moldovan2023-06-261-3/+25
| | | | Part of #901
* keymgr: Make the dummy types non_exhaustive.Gabriela Moldovan2023-06-221-0/+3
|
* keymgr: Add a TODO regarding missing dummy impls.Gabriela Moldovan2023-06-221-1/+3
|
* keymgr: Update outdated docs.Gabriela Moldovan2023-06-221-23/+10
|
* keymgr: Remove outdated TODOs.Gabriela Moldovan2023-06-221-9/+0
|
* keymgr: Remove unnecessary dummy types.Gabriela Moldovan2023-06-221-17/+3
| | | | We don't need dummy impls for `Error` and `Result`.
* keymgr: Move dummy implementation to tor-keymgr.Gabriela Moldovan2023-06-221-0/+108