| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
So now .arti_pattern() is a trait method.
arti#1151 item 3.
|
| |
|
|
| |
This is going to expand and gain private helper methods.
|
| | |
|
| |
|
|
|
| |
The previous name was ambiguous, and confusable with KeyPathError
(of which it is, basically, a variant).
|
| |
|
|
| |
Minimal changes to still compile and pass tests.
|
| |
|
|
| |
Now the only manual impl is TimePeriod, which is indeed special.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Now the fields of a `DefaultKeySpecifier` no longer have to implement
`Display` (they need to implement `KeySpecifierComponent`).
See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1733#note_2966400
Closes #1127
|
| | |
|
| | |
|
| |
|
|
|
| |
This is a separate class of errors that deserves its own error type. We
will soon use `KeyPathError` in other contexts as well.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-keymgr: Derive Builder for KeyMgr.
Closes #1114
See merge request tpo/core/arti!1760
|
| | |
| |
| |
| |
| |
| |
| | |
`KeyMgr` is soon going to have more fields, so now is a good time to
derive `Builder` for it.
Closes #1114
|
| |/
|
|
|
|
| |
KeystoreCorruptionError is about to become a variant of the top-level
keymgr Error enum (which doesn't exist yet but will be introduced in a
future commit).
|
| |
|
|
|
|
|
|
| |
For the most part, this is just code movement. The implementation was
copied over to `define_derive_adhoc` from `define_key_specifier`, with
some minor adjustments that were needed to make it compile.
Closes #1093
|
| | |
|
| |
|
|
|
|
| |
We don't really need it.
Closes #1066
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The trait is no longer sealed because users should be allowed to define
their own key denotators.
|
| | |
|
| | |
|
| |
|
|
| |
pattern.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This will enable the future `KeyMgr::list_matching()` API to return a
list that contains results from (potentially) multiple different
keystore backends.
|
| |
|
|
|
|
| |
`EncodableKey` is a trait for encoding keypairs and public keys. Keygen
only makes sense for key_pairs_ (it doesn't make sense for public keys),
so it makes sense to move `generate()` out of `EncodableKey`,
|
| |
|
|
|
|
|
|
|
| |
Previously, `EncodableKey::to_keypair_data` could only be used for
encoding private keys (its return type was `KeypairData`). Now
`EncodableKey::to_keypair_data` can return public key data (`KeyData`)
too.
Note: `to_keypair_data()` will be renamed in a future commit.
|
| |
|
|
|
|
|
|
|
|
| |
The `KeypairData` type from [ssh-key] at some point leaked into the
keymgr API (via the `EncodableKey` trait). Instead of re-exporting just
`KeypairData`, let's re-export the entire `ssh_key` crate
(`EncodableKey` implementors would need additional types from `ssh_key`
to construct a `KeypairData` object anyway).
[ssh-key]: https://crates.io/crates/ssh-key
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The `EncodableKey::to_bytes` function didn't make much sense, because
not all keys have a canonical byte representation.
This commit replaces `EncodableKey::to_bytes` with
`EncodableKey::as_ssh_keypair_data`. In the future, `EncodableKey` will
grow functions for encoding keys in other storage formats too.
Closes #965
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This also removes the corresponding
`KeyMgrError::UnsupportedKeystoreSelector` error, because it's not
needed anymore.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Closes #950.
|
| |
|
|
| |
This TODO doesn't need to block the release.
|
| |
|
|
|
| |
We've been capitalizing the "s" in "KeyStore" inconsistently. This
`s/KeyStore/Keystore/g` across the codebase.
|
| |
|
|
|
|
|
|
|
|
| |
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).
|