summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/config
Commit message (Collapse)AuthorAgeFilesLines
* arti, arti-client, tor-keymgr: Remove keystore dir configuration.Gabriela Moldovan2024-02-211-42/+0
| | | | Closes #1202
* tor-keymgr: Abolish ArtiNativeKeystoreConfig::expand_keystore_dir.Gabriela Moldovan2024-01-101-10/+31
| | | | | | This resolves a `TODO HSS` in arti-client. Part of #1187
* arti-client: use sub_builder for ArtiNativeKeystoreConfigNick Mathewson2023-12-131-0/+2
| | | | | | | | | The sub_builder pattern changes `StorageConfigBuilder` so that instead of holding an `Option<ArtiNativeKeystoreConfig>`, it holds an `ArtiNativeKeystoreConfigBuilder`. This makes it a little more ergonomic to use from Rust, and lets us use defaults for the builder fields so that we can make them optional in our configuration.
* keymgr: Use std::cfg instead of if_cfg.Gabriela Moldovan2023-07-201-9/+1
|
* keymgr-config: Make fields private, add function for checking if keystore is ↵Gabriela Moldovan2023-07-201-2/+17
| | | | | | | | | enabled. Hiding the underlying value of `enabled` enables us to give it a different `auto` value depending on whether the `keymgr` feature is enabled or not (it defaults to `true` if `keymgr` is enabled, and `false` otherwise).
* tor-keymgr: Add ArtiNativeKeystoreConfig.Gabriela Moldovan2023-07-131-0/+69
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.