| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
We're going to use this for `directory-signature`'s hash algorithm,
which the current code always treats as a string!
|
| | |
|
| |
|
|
|
| |
Make the operation of disregarding the possible existence of
already-discarded information, more explicit.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows implementing NormalItemArgument for types that can only be
parsed, or only displayed - or other combinations.
I noticed this restriction while inventing a type I later decided was
unnecessary. I still think it's a good change.
There is no practical impact elsewhere, since in practice downstream
code implements NormalItemArgument rather than relying on it.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #2485.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit implements the RouterDescSignatures type that carries the
signatures for the yet to be derived RouterDescUnverified.
|
| |
|
|
|
| |
This commit adds RouterSigEd25519 as a type to misc.rs for use in router
descriptor signatures.
|
| |
|
|
|
|
| |
This commit adds RouterDescSignature to types, which implements
SignatureItemParseable manually in order to also include the Ed25519
signature.
|
| |
|
|
|
|
| |
This commit adds a hash accumulator for router descriptor signature
hashes. We will need this because router descriptors have overlapping
signatures.
|
| |
|
|
|
|
|
| |
This commit replaces `pub use routerdesc::*` with `pub mod routerdesc`
alongside making the required changes in types.rs to not directly
prelude these types but to introduce them in their own module, as that
is the primary advantage of having these types there.
|
| |
|
|
|
| |
This commit implements ItemArgumentParseable for RelayPlatform which we
will need in the parse2 version of RouterDesc eventually.
|
| |
|
|
|
|
|
|
| |
We will need this type in public fields of the router descriptor data
type at one point, most notably for the `fingerprint` item.
No need to update semver.md because this type is, for whatever reason,
already contained there (in main)?
|
| |
|
|
|
|
| |
This commit implements NetdocParseableFields for AddrPolicy, which will
be required, because this field accumulates exit policies in a firewall
like order, making the use of it necessary.
|
| |
|
|
|
| |
This commit implements NormalItemArgument for AddrPortPattern because we
will need it later for an accumulator.
|
| |
|
|
|
| |
This commit derives PartialEq and Eq for a few types in addrpolicy.rs,
as we will need these for a few unit tests later on.
|
| |
|
|
|
| |
We will need this later for outputting RelayFamilyIds in a fashion
compatible with the current API.
|
| |
|
|
|
| |
We will need this later for outputting RelayFamilyIds in a fashion
compatible with the current API.
|
| |
|
|
|
|
| |
This commit adds the ExtraInfoDigests structure storing the, if present,
mandatory SHA-1 hash and optional SHA-256 hash of the extra-info
document associated with the router descriptor it is referenced from.
|
| |
|
|
|
|
|
| |
This commit adds RouterDescIntroItem which will serve as the
introduction item for router descriptors, that is, a line with the
keyword "router" followed by the nickname, the IPv4 address, and a few
ports.
|
| |
|
|
|
| |
This derives Eq for Nickname because we will need it for unit tests that
will be added later on.
|
| |
|
|
|
|
| |
This type comes from the specification and indicates overload
information about a relay. We will use it in router descriptors at one
point, hence why we are adding it already.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a new type, NumericBoolean, which implements
NormalItemArgument in order to be parseable with parse2.
It works very simple, namely it can be used to decode/encode a boolean
as a `0` (false) or `1` (true) which is found in a few places around
tor-netdoc.
The reason why this is its own type instead of implementing
NormalItemValue for the bool primitive is, that booleans are special
numerical types and to be future-proof against other oddities, a
separate wrapper type makes most sense.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We don't need the helper struct for this.
|
| | |
|
| |
|
|
|
|
| |
Start a new encode_impls module.
The pub(super) will be used in a moment.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Ie for "arguments" that don't actually appear.
|
| |
|
|
|
|
|
|
| |
This will let us use it in more places, more sensibly.
Sadly it means a lot of syntactic vinegar at many of the call sites in
the old parser, which has very janky ideas about how errors should
work.
|
| | |
|
| | |
|
| | |
|
| | |
|