| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Instead of doing this when we construct the listeners, we can do it
in a separate method, to simplify the return type.
|
| |
|
|
| |
Part of #2301.
|
| |
|
|
| |
Part of #2301.
|
| |
|
|
|
|
|
|
|
|
|
| |
Uses the standard clap error messages, for example:
```text
$ cargo run -p arti -- proxy -p 123a
error: invalid value '123a' for '-p <PORT>': invalid digit found in string
For more information, try '--help'.
```
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Use anyhow::Context to wrap error in useful message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to see the correspondence between CTorPaths
and the HS client/service key specifiers.
Initially, I was hoping this would make it easier to write a d-d macro
that automatically derives a `CTorPath` variant (e.g.
`HsClientDescEncKeypair`) from the KeySpecifier type name
(`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can
"chop off" name suffixes ("Specifier", in this case).
`from_ctor_path()`/`ctor_path()` implementations for converting
`CTorPath`s to and from key specifiers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Out of all the variants in `KeyPathError`, `Unrecognized` is the odd one
out, because unlike the others, which are mainly just lower level
parsing errors, `Unrecognized` is a higher level error constructed in
`KeyMgr::describe()`.
`KeyMgr::describe()` now returns an `Option`, because
* the failure to describe a user provided `KeyPath` may or may not be
an error
* previously, `describe()` would only ever return `Ok` or
`Err(KeyPathError::Unrecognized)`, which essentially a binary
result. Also, `describe()` would never return any of the other
`KeyPathError` kinds, which further suggests `Unrecognized`
doesn't belong there
The `Unrecognized` variant still exists, but is now part of
`KeystoreCorruptionError`, (returned from
`KeyMgr::validate_entry_integrity()`).
|
| |
|
|
| |
This folds `display_arti_entry()` into `display_entry()`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This is no longer needed now that `KeyMgr::describe()` works on
`CTorPath`s.
Removing this special handling has the added bonus that the keymgr CLI
output is now uniform for all keystores (before this change, `keys list`
used a slightly different output format for displaying C Tor entries).
The corresponding tests will be updated in a future commit.
|
| |
|
|
|
|
| |
This was a little funny, since the other storage elements are
declared in tor-client. Fortunately, our stacked configuration
logic handles this fine.
|
| |
|
|
|
| |
This allows applications to find out where arti is listening when
arti has been configured to listen with the port "auto".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the proxy and dns modules only had "be a proxy"
functions that ran forever. Now they have functions that bind to
listeners and return a separate "be a proxy" future that runs
forever.
This lets us simplify some kludges in subcommands::proxy. More
importantly, it will let us return the bound-to ports so that
subcommands::proxy can write them to disk.
This is a break in experimental-apis, which does not require a
semver change.
|
| | |
|
| |\
| |
| |
| |
| | |
Add `KeyMgr` accessor to `TorClient`
See merge request tpo/core/arti!3442
|
| | |
| |
| |
| |
| |
| | |
`run_check_integrity`
This change simplifies the signature of `run_check_integrity`.
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
| |
Closes #2225
|
| |
|
|
| |
This is _all_ renaming and comment adjustments.
|
| |
|
|
| |
I'm about to add another proxy type.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
and `keystores`
|
| |
|
|
| |
The function now returns `Result<Vec<InvalidKeystoreEntry<'a>>>`
|
| |
|
|
|
|
|
| |
Add a check in `run_check_integrity` to verify that the `expired_entries`
collection is empty after processing all registered keystores. This should
always be true, as all expired entries are expected to be removed during
iteration. If not, it indicates a bug.
|
| |
|
|
|
| |
Replace raw tuples with named structs to reduce type complexity and improve
code clarity and maintainability.
|
| | |
|
| |
|
|
| |
`run_check_integrity`
|
| |
|
|
|
|
| |
- Fix bug where expired keys from one keystore were incorrectly
associated with all keystores
- Remove unnecessary clone
|
| |
|
|
| |
`run_check_integrity`
|
| |
|
|
|
|
| |
- Add `display_invalid_keystore_entries` helper function
`print_check_integrity_incipit`
- Add `display_invalid_keystore_entries` comment
|
| |
|
|
|
|
| |
Add initial functional implementation of `display_invalid_keystore_entries`,
which processes a list of invalid keystore entries grouped by `KeystoreId`
and displays them with associated error messages.
|
| |
|
|
|
|
|
|
|
|
| |
Create the skeletal version of the new `display_invalid_keystore_entries` function
and adapt `run_check_integrity` to use it.
The function now takes a slice of pairs, each containing a `KeystoreId` and a vector
of invalid keystore entries along with their error messages, and processes all
entries internally by iterating over each keystore, instead of being called
once per keystore.
|
| |
|
|
|
|
|
|
|
| |
Previously, the function worked with a flat `Vec<KeystoreEntryResult<KeystoreEntry>>`.
Now, it uses a structured `Vec<(KeystoreId, Vec<KeystoreEntryResult<KeystoreEntry>>)>`,
grouping entries by keystore.
This makes it easier to track which keystore each entry belongs to,
and prepares the code for upcoming improvements.
|
| | |
|
| |
|
|
|
|
| |
It's unlikely these arguments will be particularly useful, and omitting
skip_all can have security implications, so it's better to avoid it to
reflect good practice.
|
| |
|
|
|
| |
I've added these in places that are useful for the debugging that I've
been doing.
|
| | |
|
| | |
|
| | |
|