| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
Apply deferred clippy churn.
|
| |
|
|
|
| |
Invent a trait a la circmgr config for the hs client connector config.
Plumb a suitable value all the way through to the code that will use it.
|
| |
|
|
|
|
|
| |
We put this in `[address_filter]`.
The interaction with the corresponding stream preference is a bit
complicated. We must turn the stream pref into a `BoolOrAuto`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Doing this causes TorClientBuilder to become Send. I also add a
test to ensure that TorClientBuilder remains Send in the future.
This isn't a semver break, but only because DirProviderBuilder is
marked with `experimental-api`.
Closes #924
|
| |
|
|
| |
Otherwise we'll fill up our RAM with junk.
|
| | |
|
| |
|
|
|
| |
`dummy.rs` will be moved to `tor-keymgr`, which will export everything
from the module.
|
| | |
|
| |\
| |
| |
| |
| | |
lints: Promote clippy::print_stderr and clippy::print_stdout
See merge request tpo/core/arti!1271
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
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
|
| |\ \
| | |
| | |
| | |
| | | |
Fix a rustdoc link.
See merge request tpo/core/arti!1274
|
| | |/ |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
| |
The `keymgr` module selects one of the key manager implementations
(dummy or "real") and exposes all the APIs we need, so we can remove
all of the cfgs related to the `keymgr` feature from `client.rs`.
Part of #897
|
| |
|
|
|
|
|
|
| |
This moves the key manager API selection (dummy vs "real" impl) into the
`keymgr` module. The module exports the dummy API if the `keymgr`
feature is disabled, and the impl from `tor-keymgr` otherwise.
Part of #897
|
| |
|
|
|
|
| |
`insert` and `remove` should return an error rather than `Ok(())`, as
`Ok(())` implies the key was stored/removed, which is impossible in the
no-op implementation.
|
| |
|
|
|
|
| |
This will help us reduce the number of `#[cfgs(...)]` from `client.rs`
Part of #897
|
| |
|
|
| |
Part of #897
|
| |
|
|
| |
Part of #897
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We currently initialize the `ArtiNativeKeyStore` with a dummy root dir,
so when `ArtiNativeKeyStore` starts validating directories, this code
will start to fail. Let's preemptively ignore any errors coming from
`ArtiNativeKeyStore::new`. This is temporary and will be removed when we
introduce the key store config (and a real default value for the
keystore root dir).
|
| | |
|
| | |
|
| |
|
|
| |
Reformatting deferred for clarity.
|
| |
|
|
| |
This test case shows that we return a suboptimal error in some cases.
|
| |
|
|
|
| |
ErrorDetail isn't PartialEq so we can't assert_eq! it.
But the discriminants will be.
|
| | |
|
| |
|
|
| |
This disposes of the TODO as well.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
(Taken from tpo/core/arti!1113 and squashed by Ian Jackson, with
conflicting hunk in StreamPrefs struct skipped.
The setter name is wrong, the cfg feature is wrong, there are no
docs, and the TODO is still there. These will be fixed in a moment.)
|
| |
|
|
|
| |
This should be enabled by default. There's still no setter for not,
nor is it honoured - those are separate TODOs.
|
| |
|
|
|
| |
Previously this error meant "we haven't written this code yet".
Now, we change it to "you haven't built Arti with this feature".
|
| | |
|
| |
|
|
| |
No functional change yet. We'll use this shortly.
|
| |
|
|
| |
Disposes of two TODOs.
|
| |
|
|
| |
This will make subsequent commits less noisy to read.
|
| |
|
|
|
| |
These have already been partially/replaced supplemented.
The other test referred to will appear shortly.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We need to allow some lints in the dummy key manager because its
implementation needs to mirror that of `tor_keymgr::KeyMgr` (so we can't
apply the API changes suggested by clippy).
|
| |
|
|
|
|
|
|
|
| |
TorClient now only uses the tor_keymgr::KeyMgr implementation if the
keymgr experimental feature is enabled. If the feature is disabled, a
dummy key manager implementation is used.
The new `keymgr` feature depends on `onion-client`, because the key
manager is only used for HS client auth.
|
| | |
|
| |
|
|
|
|
|
| |
This simplifies usage quite a bit and will enable us to implement a
dummy `KeyMgr` that doesn't depend on the error types from tor-keymgr
(which will replace the "real" `KeyMgr` if the keymgr feature is
disabled).
|
| | |
|
| |
|
|
|
|
| |
The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to
`tor-hsclient`. The HS service secret key specifier stubs are moved to
`tor-hsservice`.
|