summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/dummy.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-keymgr: Remove now-unnecessary clippy allows from dummy impl.Gabriela Moldovan2024-11-201-2/+0
|
* tor-keymgr: Allow dead code in dummy KeyMgr.Gabriela Moldovan2024-11-201-0/+2
| | | | | | | | | The fields are never read but need to be present in order for the dummy `KeyMgrBuilder` to have the same interface as the real one. (We could of course manually implement the builder, or let the dummy `KeyMgrBuilder` impl diverge from the real one, but for now let's leave this as-is and simply mark the fields as unused).
* tor-keymgr: Remove unused dummy error type.Gabriela Moldovan2024-11-201-16/+1
| | | | | We no longer have any dummy keymgr operations that return an error, so this error type is unused.
* tor-keymgr: Remove unused imports from dummy module.Gabriela Moldovan2024-11-201-2/+1
|
* tor-keymgr: Remove unused dummy KeyType.Gabriela Moldovan2024-11-201-14/+0
| | | | This is not used anywhere (or exported publicly).
* tor-keymgr: Say that another option is to enable keymgr unconditionally.Gabriela Moldovan2024-11-141-0/+2
| | | | | This commit applies Diziet's suggestion from https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2631#note_3130234
* tor-keymgr: Remove a couple of dummy KeyMgr functions.Gabriela Moldovan2024-11-141-14/+0
| | | | | | | These are not actually needed anywhere. In fact, it's a bad idea to have them in the first place (see the comment from the dummy `KeyMgr` impl block).
* tor-keymgr: Explain why the dummy keymgr is missing some functions.Gabriela Moldovan2024-11-141-1/+28
| | | | | | | | This is based on a recent discussion with @Diziet on IRC. For the full context, see the chat log attached to the ticket. Closes #1732
* tor-keymgr: Rename the primary keystore for clarity.Gabriela Moldovan2024-09-231-1/+1
| | | | | | | | | | Previously, arti's primary keystore was referred to as its "default" keystore. However, "default" is inaccurate here: there is no way to meaningfully override this "default" (the "default" store acts as the main keystore). Throughout the codebase, we query all keystores for keys (including the secondary ones), but only ever write to the default/primary keystore. This is OK for now, because it enables us to have one mutable keystore, and multiple secondary, read-only stores.
* tor-keymgr: added dummy implementation of ArtiEphemeralKeyStoreMorgan2024-09-201-0/+14
|
* 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