| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The Microdesc type having a copy of the document hash was always
weird, and it's weirder now that there's all these parse2 types that
don't have it and parse2 derives on Microdesc that don't touch it.
Make a new type for the descriptor and its hash.
Use deref to arrange that the new type works almost like the old one.
Adjust the use lines in the dependencies to temporarily import
MicrodescAndHash as Microdesc.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
|
|
| |
This commit removes the implementation of ItemArgumentParseable for
curve25519::PublicKey in favor of using the already existing
Curve25519Public, which also got beefed up slightly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes a bug in the microdescriptor parser to properly parse
multiple family-ids.
Previously, we interpreted the spec to simply contain multiple
`family-ids` lines. This is wrong however. Instead, there may only be
a single such line with multiple values.
To fix this issues, we itnroduce a `RelayFamilyIds` type, similar to
`RelayFamily`, that stores multiple `RelayFamilyId` entires in a `Vec`.
Then, we just derive `ItemValueParseable` on it and win.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to parse2 micro descriptors, which will be very
useful later on.
For this, it makes a few changes. Most notably, it introduces a
(private) field called `onion_key`, which stores an optional RSA onion
key, as it serves as the introduction line for this netdoc document
type. Besides, it also changes the `ed25519_id` type to the
`Ed25519IdentityLine` wrapper type, although the signature of the
respective getter remains the same.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| |
|
|
|
|
| |
This should save 1-3 MB of ram on each running arti client.
Closes #384. See also tor#27359 and proposal 298.
|
| |
|
|
|
| |
Every other case of tor_netdoc::Error means a parse failure. This one,
though, means a failure to construct a document.
|
| | |
|
| | |
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|