| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit implements the Ed25519IdentityCert type using EmbeddableCert
logic that was introduced recently. These certificates contain the
identity key and the signing key of a relay and the type provides two
methods: .verify() for verification and .new_signed() for construction.
Besides, edcert::* is now made public as this is required now given that
it contains public types.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit adds the test utilities required for testing the
yet-to-be-implemented Ed25519IdentityCert and Ed25519FamilyCert types,
whose interface largely overlaps, making a test "framework" useful to
avoid code duplication.
Their interfaces consist of two functions:
* `.verify(Ed25519Identity, KeyUnknownCert, Duration, SystemTime)`
* Verifies a KeyUnknownCert whether it is valid, given a SystemTime
plus post valid tolerance alongside a well-known identity key in
the case of family certificates.
* `.new_signed(&ed25519::Keypair, Ed25519Identity, SystemTime)`
* Creates a new certificate from a signing keypair plus a certified
key alongside a SystemTime at when this certificate will expire.
The commit introduces a testing trait that will be implemented for both
types once added. Then, there are two generic tests that test the
generation and verification of a valid random one as well as a test that
tests violation of various constraints common to these certificates.
The generic trait is most notable for the .new_signed() and .verify()
method which we are roughly documented. Please see the next commit for
a concrete example if understanding is hard.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit moves the documentation for FromIterator<RelayFamilyId> for
RelayFamilyIds to the type level documentation of RelayFamilyIds. It
also rephrases the comment to fit in there more nicely grammatically and
contextually, as a pure motion of the comment would not have been
helpful to have there in any circumstance.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Adds a TODO with regard to .sort() and .dedup() in FromIterator in
RelayFamilyIds and the fact that it is slightly weird. This is not a
new problem with the type but stems from the fact that it tries to
emulate a BTreeSet inside a Vec which is not nice.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
While already here, do this change, in case it becomes useful later on.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This makes working with this more comfortable as those calls are
generally required anyways.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
RsaIdentity implements Copy itself so it makes sense to derive it on
those wrappers too.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Helpful in tests instead of Deref.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes an outstanding TODO.
|
| |/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We will need an inverse of the existing From implementation so that
derivation makes sense because we will obtain it for free then.
|
| |\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Hopefully non-controversial parts of RPC configuration prep work
Closes #2532
See merge request tpo/core/arti!3979
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is _just_ the results of a rustfmt invocation on this file.
Due to #2532, these modules were getting overlooked by our regular
rustfmt checks. I'm planning to circle back later on and fix #2532,
but for now, reformatting these files will make future edits cleaner.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We'll use this in RPC to implement configuration changing.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This will be used by RPC. Probably. It might actually be a better
to re-serialize the configuration after parsing it, so that our
inspection functions can see default values.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
No functional change.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This commit deserves no explanation, it should be the default.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This commit introduces `RouterDesc::router` using `RouterDescIntroItem`
by moving `nickname`, `orport`, `dirport`, and `ipv4addr` into it.
A notable change is that ipv4addr is no longer stored in an `Option`.
I have no idea why this was the case because it has always been
mandatory and never None anyways, but I suspect it was to be able to
treat it as an iterator, something we can also achieve using
iter::once().
|
| | |_|_|/ / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The access_symlink() test fails when using musl libc, which for ELOOP
uses the string: [1]
> "Symbolic link loop"
libc errors should be matched against the standardized error names
rather than the libc error messages.
This behaviour has been recognized by the maintiner of the Alpine Linux
Arti port who had to delete this test to have it build against musl.[2]
[1] https://git.musl-libc.org/cgit/musl/tree/src/errno/__strerror.h#n52
[2] https://gitlab.alpinelinux.org/alpine/aports/-/blob/3.23-stable/community/arti/disable-access_symlink-test.patch
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Make all TorClient constructors wrap the TorClient in an Arc.
Closes #2469
See merge request tpo/core/arti!3990
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
These were only Arc<> so that TorClient could implement Clone.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The `set_stream_prefs` method was the only one that took a TorClient
as `&mut self`. But we only expose Arc<TorClient<R>>, that isn't a
reasonable API.
The `clone_with_prefs` method has been renamed, since it no longer
"clones" anything meaningfully.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is part of rationalizing the structure of TorClient so we can
refactor startup logic, and so that RPC code can reason about object
identity. See #2469.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
tor-netdoc: Constructor: insist on proper Constructor non-exhaustive pattern
See merge request tpo/core/arti!3986
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
hashx: Update rand version used in fuzz tests.
See merge request tpo/core/arti!3987
|
| | |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is less important now that we've disabled these tests, but might as
well make it easier if anyone picks these up in the future.
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Turn an expectation into an allow
See merge request tpo/core/arti!3983
|
| | | |/ / / / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes `cargo clippy --locked --all-features -p arti`
|
| |\ \ \ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
chanmgr: Do not turn connect errors into proxy errors.
Closes #2459
See merge request tpo/core/arti!3932
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Also, change the address type in the error to String for now.
In reality we need a better representation of this error,
but that shouldn't block this.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Proxy belonged as a subcase of ChannelBuild. And ChannelBuild
was only about making an initial connection.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This fixes the problem where we'd report all connect failures as
proxy failures.
Closes #2459.
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
clippy: Work around bug where it claims method doesn't exist
See merge request tpo/core/arti!3982
|
| | | |/ / / / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes
warning: `rand::RngExt::random_range` does not refer to a reachable function
--> /volatile/rustcargo/Rustup/Arti/arti/clippy.toml:7:5
|
7 | { path = "rand::RngExt::random_range", reason = "Prefer tor_basic_utils::RngExt::gen_range_checked to avoid uncontrolled panics, or gen_range_infallible if applicable" },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `allow-invalid = true` to the entry to suppress this warning
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Use FixedB64 since it is in fact fixed length.
While we're here, add the docs link I had to follow to figure this
out.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Only SharedRandStatuses was out of place.
|