| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This doesn't seem to be needed anymore.
|
| | |
|
| |
|
|
|
| |
Otherwise, we get a dead code warning when the `ctor-keystore` feature
is disabled.
|
| |
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
| |
We no longer have any dummy keymgr operations that return an error,
so this error type is unused.
|
| | |
|
| |
|
|
| |
This is not used anywhere (or exported publicly).
|
| |
|
|
|
| |
This commit applies Diziet's suggestion from
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2631#note_3130234
|
| |
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Also updated other packages to get `CfgPath` directly from
`tor-config-path' instead of 'tor-config'.
|
| | |
|
| |
|
|
|
|
|
| |
Now
cargo check --workspace --no-default-features --all-targets
cargo build -p arti --no-default-features --features=memquota,tokio,native-tls
are both clean.
|
| |
|
|
| |
This breaks up a long statement to improve readability.
|
| |
|
|
|
| |
This is a follow-up to !2393, which added support for the
`key_specifier` top-level attribute.
|
| |
|
|
|
|
| |
It looks like my previous attempt from !2516 didn't fix it.
This adds an extra space to fix the `doc_lazy_continuation` lint.
|
| |
|
|
|
| |
Addresses the `doc_lazy_continuation` lint, fixing the `rust-latest` job
that's currently failing on main.
|
| | |
|
| |
|
|
|
|
|
| |
This way we have a more intuitive layout, where all C Tor keystore
configuration is under the `ctor` key.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2481#note_3090486
|
| | |
|
| | |
|
| |
|
|
|
| |
This moves `assert_found` out of the `keystore::arti::test` so we can
reuse it for testing other keystore implementations too.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is intentionally partially mis-indented to make this more
reviewable (in case the reviewer isn't using `ignore-all-space`).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The `FilesystemError::Filesystem` variant was actually just for IO
errors.
|
| |
|
|
|
|
|
|
| |
This will be reused by other on-disk key stores (such as the C Tor ones
we're about to add).
I recommend reviewing this commit using
`git diff --color-moved=zebra --ignore-space-change`
|
| |
|
|
| |
This will be used to create relative paths representing C Tor keys.
|
| |
|
|
| |
We're about to add a separate constructor for CTor paths.
|
| |
|
|
| |
We are about to use this for the ctor keystore implementation too.
|
| | |
|
| |
|
|
|
| |
This is only used for representing portions of `ArtiPath`s, so let's
rename it accordingly.
|
| |
|
|
|
|
|
| |
`KeyPath::matches` now returns a boolean (because we can't return a
matching "range" for `CTorPaths`, because unlike ArtiPaths, they're not
represented as `String`s, and do not have variable parts that need to be
captured).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C Tor's client restricted discovery keys don't have the service hsid
encoded in the filename (the hsid of the service each key is associated
with is encoded in contents of the key file). This means that given a
key specifier like `HsClientDescEncKeypairSpecifier` (which is a wrapper
over an HsId), we can't actually compute the relative path of the key in
its `KeySpecifier::ctor_path()` implementation. To do so we would need
to access the keystore to figure out which path contains the requested
HsId, which we can't (and shouldn't!) do from within the `KeySpecifier`
impl.
This suggests the String newtype (representing a relative path) we
previously had is not a good abstraction for `CTorPath`s. Moreover,
`CTorPath` are static (they don't have dynamic components like
`ArtiPath`), so it makes more sense to model `CTorPath` as an enum.
The new `CTorPath::ClientHsDescEncKey(HsId)` variant will be used to
instruct the C Tor client keystore to find the file that contains the
specified `HsId`, while the `Service` variant will be used for hidden
service keys.
|
| | |
|
| |
|
|
|
|
|
|
| |
The `KeyMgrBuilder` now returns an error if the configured keystores
don't have pairwise unique IDs. This is needed because some keymgr
operations take a `KeystoreSelector` specifying the ID of the keystore
the operation should be performed on, and assume that the keystore ID
uniquely identifies a single keystore.
|
| |
|
|
|
|
|
|
| |
The config will soon contain secondary C Tor keystore configuration too,
so the `arti` namespacing is about to stop making sense.
I recommend reviewing this commit using
`git diff --color-moved=zebra --ignore-space-change`
|
| |
|
|
|
|
|
| |
We are about to need this in `tor-keymgr`, where we're about to add a
config for C Tor service keystores (the C Tor keystore config will have
an associated `HsNickname` that specifies which of the arti hidden
services it's supposed to be used with).
|
| | |
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
| |
In !2394 we settled on `kind`. This updates the error messages to
reference the new field name.
|
| |
|
|
|
| |
The keystore settings only configure the *primary* keystore, so they
should be under `keystore.primary`.
|