| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
This will let us (re)use the existing signature checking code with the
parse2 type, since we'll be able to make a SignatureGroup out of a
parse2'd UnverifiedNetworkStatus.
|
| |
|
|
|
| |
This will allow it to be a replacement inside `SignatureHashes`.
Keeping the fields private seems to have been an oversight.
|
| |
|
|
|
| |
This is the whole of the footer section, with docs, appropriate
derives, and so on.
|
| | |
|
| |
|
|
| |
This matches the spec.
|
| |
|
|
|
|
|
|
|
|
|
| |
This will allow us to include this, conditionally, in the new
per-variety footer types for consensuses, without too much disruption
to the existing code.
We don't leave a compatibility alias because we're going to want a
Footer in each_variety.rs which is the actual sub-document. This old
struct isn't suitable because it doesn't have the intro item and is
just for consensuses.
|
| | |
|
| |
|
|
|
|
| |
This commit adds the bandwidth field to the RouterDesc struct as it is
found within the spec. The legacy parser will not support it, hence why
we do default values there.
|
| |
|
|
|
| |
This commit adds the bandwidth struct for router descriptors which is
present in the `bandwidth` item.
|
| |
|
|
|
|
|
|
|
| |
This commit adds a new type, Ed25519FamilyCert, which works very similar
to Ed25519IdentityCert, except that it supports family certificates.
A notable difference is, that the identity key must be provided during
verification because it does not make sense to verify these certificates
without it.
|
| |
|
|
|
|
|
|
|
|
| |
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 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().
|
| | |
|
| | |
|
| |
|
|
|
| |
This will let us use them in types in ordered lists in netdocs,
without fuss.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This change might seem pointless for now but it will be required and
unavoidable later on, because we will have to change
RouterDesc::fingerprint from RsaIdentity to Option<SpFingerprint> which
will make it impossible to be used inside the getter anymore.
With this change, our only resort is to obtain the RSA identity from the
signing key but we can only return a copy then because that RSA identity
is created ad-hoc then.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the name of all (except accept/reject) real items in
RouterDesc to their proper name as found in the spec.
This is a breaking change and semver.md has been updated properly.
In the instanciation of RouterDesc in the legacy parser, we now use a
"weird" syntax of some fields using a different name throughout the
code, but that is ok. Changing this would make the diff way larger at
the risk of breaking things, especially because many variables such as
identity_cert get shadowed countless times within the function, making
it harder and error prone to change.
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|