| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
The `Unsupported` variant is no longer needed now that we support
`KeyType::X25519StaticSecret`s.
|
| | | |
|
| | |
| |
| |
| |
| | |
This also fixes a bug which caused the function to always return a
type-erased `()` instead of the actual key!
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This previously just re-exported `ssh_key::Algorithm`.
However, we will need to support x25519 keys (which aren't supported by
the `ssh_key` crate), so we define our own enum for the key algorithm.
In addition to the `Algorithm` variants from `ssh_key`, our enum also
has an `X25519` variant.
|
| | |
| |
| |
| |
| | |
These TODOs can be deferred for now: we're not declaring the keymgr APIs
stable until we add support for hidden services.
|
| | |
| |
| |
| | |
These don't need to be blockers for the next release.
|
| | |
| |
| |
| | |
These were tackled in #901.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
| |
The `source` impl `tor_keymgr::Error` was just calling itself
recursively.
|
| | |
|
| |
|
|
|
|
| |
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).
|
| | |
|
| | |
|
| |
|
|
| |
Part of #901
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Part of #901
|
| |
|
|
|
|
|
| |
This also implements `AsRef<StdError>` for `Bug` to satisfy the
`KeystoreError: AsRef<dyn StdError>` trait bound.
Part of #901
|
| |
|
|
|
|
| |
The new `BoxedError` type will replace `tor_keymgr::Error`.
Part of #901
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We don't need dummy impls for `Error` and `Result`.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The dummy key manager impl from `arti-client` will be moved to
`tor-keymgr` soon. This commit adds a `keymgr` feature flag to
`tor-keymgr` which will eventually be used to choose between the real
key manager API and the dummy one.
|
| | |
|
| |
|
|
| |
This TODO talks about a change we've decided not to implement.
|
| |\
| |
| |
| |
| | |
lints: Promote clippy::print_stderr and clippy::print_stdout
See merge request tpo/core/arti!1271
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
This TODO was addressed in #899
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This also updates `ArtiNativeKeyStore`'s `KeyStore::remove`
implementation to build the absolute path of the file being removed, by
joining `self.keystore_dir` and the relpath returned by
`ArtiNativeKeyStore::key_path()`.
This addresses #908
|
| | |
| |
| |
| |
| | |
Sometimes we need the underlying String (for example to create a
PathBuf).
|
| |\ \
| | |
| | |
| | |
| | | |
keymgr: Remove Error::NotFound, update KeyMgr, KeyStore APIs.
See merge request tpo/core/arti!1280
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes the `NotFound` `tor_keymgr::Error` variant. Since `KeyMgr`
and `KeyStore` users will need to be able to distinguish between "not
found" errors and other I/O errors, this also changes the return types
of the `get()` and `remove()` functions of `KeyStore` and `KeyMgr`,
which now return `Ok(None)` instead of `Error::NotFound`.
This makes the `KeyStore` API consistent with `KeyMgr::get`, which
already has a return type of `Result<Option<K>>` (rather than
`Result<K>`).
This also prepares us for #901, which will make key store errors
opaque. Without this change:
* we'd have to create a `struct NotFoundError;` error type. Its
`HasKind` impl would need to return a new
`ErrorKind::KeyStoreErrorNotFound` `ErrorKind` variant
* callers would have to match the `error_kind()` of the error to
figure out whether the key simply can't be found
(`ErrorKind::KeyStoreErrorNotFound`), or if something went wrong
(any other `ErrorKind`).
Given the above, I think `Result<Option<()>>` makes for a more ergonomic
API.
Part of #901
|
| |\| |
| | |
| | |
| | |
| | | |
keymgr: Remove unnecessary condition.
See merge request tpo/core/arti!1277
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't need to special-case `NotFound` errors because
`ssh_key::PrivateKey::from_openssh` doesn't read from disk (so it
shouldn't be returning `NotFound` errors in the first place).
Previously, this condition made sense because we were using
`ssh_key::PrivateKey::read_openssh_file` instead of
`ssh_key::PrivateKey::from_openssh`, which _does_ read from disk. This
condition should have been removed in !1263 (the refactoring where we
switched to `from_openssh`).
(Also, after #901 is implemented, we probably won't have an
`Error::NotFound` error anymore).
|
| |/
|
|
|
| |
This TODO describes something we're not planning to implement, so let's
just remove it.
|
| | |
|
| | |
|
| |
|
|
| |
keystore.
|