aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* keymgr: Add a newtype for keystore identifiers.Gabriela Moldovan2023-07-211-0/+22
|
* keymgr: Remove unused KeystoreSelector::All variant.Gabriela Moldovan2023-07-211-2/+0
| | | | | | This also removes the corresponding `KeyMgrError::UnsupportedKeystoreSelector` error, because it's not needed anymore.
* keymgr: Add type for specifying which keystore to access.Gabriela Moldovan2023-07-201-0/+13
|
* tor-keymgr: Add ArtiNativeKeystoreConfig.Gabriela Moldovan2023-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the keystore config consisted of a single field in `StorageConfig`, which encoded 2 bits of information: whether the keystore is enabled, and its root directory: ``` [storage] # use this path, fail if compiled out # keystore = "/path/to/arti/keystore" # # use default path, fail if compiled out # keystore = true # # disable # keystore = false ``` This commit adds `ArtiNativeKeystoreConfig`, which will replace the multi-purpose `keystore` field. The new config will look like this: ``` #[storage.keystore] # Whether the keystore is enabled. # # If the `keymgr` feature is enabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # * set to true, the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # # If the `keymgr` feature is disabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", we will ignore the configured keystore path. # # Setting this option to true when the `keymgr` feature is disabled is a # configuration error. #enabled = "auto" # The root directory of the arti keystore #path = "${ARTI_LOCAL_DATA}/keystore" ``` While `ArtiNativeKeystoreConfig` currently only has 2 fields, `enabled` and `path`, future versions of the keystore might require additional config options.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* keymgr: Downgrade "TODO hs" to "TODO HSS"Gabriela Moldovan2023-06-301-0/+3
| | | | This TODO doesn't need to block the release.
* keymgr: Rename KeyStore to Keystore globally.Gabriela Moldovan2023-06-291-2/+2
| | | | | We've been capitalizing the "s" in "KeyStore" inconsistently. This `s/KeyStore/Keystore/g` across the codebase.
* keymgr: Define `ArtiPathComponent`.Gabriela Moldovan2023-06-291-1/+1
| | | | | | | | | | An `ArtiPathComponent` is a substring of an `ArtiPath`. An `ArtiPathComponent` will be validated according to the same rules as `ArtiPath`. In the future we can replace `HsClientSpecifier` with `ArtiPathComponent` (they both serve the same purpose except `ArtiPathComponent` is more generic).
* keymgr: Create a KeyStoreError trait for keystore errors.Gabriela Moldovan2023-06-261-1/+1
| | | | | | The new `BoxedError` type will replace `tor_keymgr::Error`. Part of #901
* keymgr: Remove unnecessary dummy types.Gabriela Moldovan2023-06-221-2/+1
| | | | We don't need dummy impls for `Error` and `Result`.
* keymgr: Move dummy implementation to tor-keymgr.Gabriela Moldovan2023-06-221-5/+22
|
* keymgr: Remove unnecessary pub(crate).Gabriela Moldovan2023-06-221-5/+5
|
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* keymgr: Move the HS client and service key specifiers out of tor-keymgr.Gabriela Moldovan2023-06-151-1/+0
| | | | | | The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to `tor-hsclient`. The HS service secret key specifier stubs are moved to `tor-hsservice`.
* keymgr: Introduce ToEncodableKey to simplify lookups.Gabriela Moldovan2023-06-151-1/+1
| | | | | | | This means `KeyMgr` users don't need to specify the underlying key type (e.g. `ed25519::Keypair`) when retrieving keys. Instead, they can just specify the type required (as long as it implements `ToEncodableKey`), e.g. `HsClientIntroAuthKeypair`.
* keymgr: Add key manager implementation stub.Gabriela Moldovan2023-06-151-0/+2
|
* keymgr: Add ArtiNativeKeyStore implementation skeleton.Gabriela Moldovan2023-06-151-0/+54
This adds implementation stubs for `ArtiNativeKeyStore`, and introduces the traits needed to make the `KeyStore` APIs work.