| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | | |
This saves us from having to check whether it is 0, and better
represents what the type is allowed to be.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The "flow-control" item is documented in proposal 324 section 9.1;
there's a ticket (torspec#418) to document it.
The "proto" item is documented at
https://spec.torproject.org/rend-spec/hsdesc-encrypt.html#item:proto
|
| | | | |
|
| |/ /
| |
| |
| | |
This will be used for exit port summary calculations.
|
| | |
| |
| |
| |
| | |
This reverts the Eq derives added in !4150 while keeping the PartialEq,
in order to support including this in Unknown.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This test is now called test_parse2_simple and intended to test simple
parse2 and encode round-trip functionality without edge-cases and such.
More edge tests will be added once we have a proper verification logic.
|
| | |
| |
| |
| |
| |
| | |
This commit adds a round-trip encoding test to test_parse2 that encodes
the decoded results and decodes them again in order to verify that the
again decoded result is equal to the original one.
|
| | |
| |
| |
| |
| |
| |
| | |
Required for round trip encode testing which we will add in the next
commit.
We only keep the actual RouterDescSignatures because then we can do Eq.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Needed for encoding.
|
| | |
| |
| |
| |
| | |
This appears in a lot of debug output and the `... lo: ... hi: ...`
formulation is very noisy.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This type consists of, and will always consist of, two u16. Making it
Copy is convenient.
This will preclude us making it contain a RangeInclusive because
std::ops::RangeInclusive is not Copy (due to API design blunder in
std), and std::range is still unstable. I think that's OK.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
| |
Callers in policy.rs's sub-modules should not be required to open-code
constructing this, even though they can.
(PortRanges is module-private, so this is too.)
This is without prejudice to possible rationalisation of the types
in this area.
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4141#note_3430551
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
"Pattern" is wrong. Everything here is a pattern. This field is
the *address* pattern as opposed to the *ports* pattern.
|
| | |
|
| | |
|
| |
|
|
| |
impl From<IpNet>, Copy, Hash
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
No longer required because it implements Copy.
|
| |
|
|
|
|
|
|
|
|
| |
This commit fixes the range to NOT include SystemTime::UNIX_EPOCH.
This is because TimerangeBound makes a difference between a lower bound
being Some or None.
This was discovered later during test and is crucial to properly detect
a minimum in the yet-to-be-merged .verify() method for router
descriptors.
|
| |\
| |
| |
| |
| | |
tor-netdoc: ExpandedKeypair for Ed25519NtorCrossCert::new_signed()
See merge request tpo/core/arti!4155
|
| | |
| |
| |
| |
| |
| |
| | |
This commit changes Ed25519NtorCrossCert::new_signed() to accept an
ExpandedKeypair instead of a Keypair, because when converting the ntor
key using convert_curve25519_to_ed25519_public(), only the
ExpandedKeypair is returned, which is a one-way conversion from Keypair.
|
| |\ \
| |/
|/|
| |
| | |
tor-netdoc: Remove document hash from Microdesc struct (and add MicrodescAndHash for that)
See merge request tpo/core/arti!4138
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Code motion, plus adding a new impl block, to make the next commit
clearer.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Replace trivial string slice
See merge request tpo/core/arti!4143
|
| | | | |
|
| | | |
| | |
| | |
| | | |
No functional change, just reformatting.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit replaces the use of string slices with str::get() in all
document related code.
While this is not a perfect replacement for it, the relevant parts in
the code heavily depend upon the byte offsets returned by the low level
(legacy) parser where changing it would lead to a very big refactoring.
Nonetheless, this approach is better because returning a bug is better
than crashing.
|
| | |
| |
| |
| | |
Removes a blocking comment and replaces it with a TODO DIRAUTH.
|
| | |
| |
| |
| | |
As a shorthand for T::intern_cache().intern(value).
|
| | |
| |
| |
| | |
This commit wraps the port policies in an Intern.
|
| | |
| |
| |
| | |
This commit wraps the relay family in an Intern instead of an Arc.
|
| | |
| |
| |
| | |
Just a boilerplate implementation.
|
| | |
| |
| |
| |
| | |
This commit implements ItemValueParseable and ItemArgumentParseable for
Intern<T> types. This should be sufficient for the time being.
|
| | | |
|