| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
This is rather ugly, because the protocol is being ad-hoc again.
|
| | |
|
| | |
|
| |
|
|
|
| |
Preamble now doesn't contain anything that's *wrong*. It is missing a
couple of fields that will be wanted when we generate votes.
|
| |
|
|
|
| |
This isn't needed for the arti dirauth consensus method, but it will
be needed for arti dirauth vote calculator.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will let us use them in types in ordered lists in netdocs,
without fuss.
|
| |
|
|
|
| |
And document its meaning when parsing and encoding as flattened
fields.
|
| | |
|
| | |
|
| |
|
|
| |
ns_type! is a non-path type.
|
| |\
| |
| |
| |
| | |
Store fingerprint in Option<SpFingerprint>
See merge request tpo/core/arti!3978
|
| | | |
|
| | |
| |
| |
| |
| | |
Will be required and unavoidable as we will change fingerprint to
Option<SpFingerprint> in the next commit.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Sort out netstatus signatures
See merge request tpo/core/arti!3937
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3937#note_3405033
Suggested-by: Clara Engler <[email protected]>
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Abolish the terrible macro.
Review with --color-moved-ws=allow-indentation-change --color-moved.
|
| | | |
| | |
| | |
| | |
| | | |
hash_slice_for_verification is still needed by code in poc, that we're
not replacing in this MR. So that TODO gets downgraded, instead.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Now that everything is prepared, we can add the sha1_unnamed field in
the hash accumulator.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
In order to handle marked vs unmarked SHA1 correctly, it needs the
original DigestAlgoInSignature.
The only call site is in poc's verification code.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use prod's Signature instead.
This gets rid of:
* The old parsing code. We have a new approach based on
ItemValueParseable, KeywordOrString and and DigestAlgoInSignature.
* The duplicate DirectorySignaturesHashesAccu and its temporary conversions.
poc's verify_timeless function needs a little adjustment for the new
struct layout.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This function is not right, yet. We're going to fix it later.
Review with --color-moved.
|
| | | |
| | |
| | |
| | |
| | | |
This is now pretty straightforward. The functions it calls need some
work - we have blocking TODOs for that.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This now contains the hashing code that was in poc.
In poc it was entangled with the signature type, mostly because once
upon a time the hash was inside the signature.
In the real code we can make it a standalone method. It takes
DigestAlgoInSignature so that it will be able to handle the explicit
vs implicit sha1 anomaly correctly - but it can't do that yet because
the necessary field doesn't exist yet.
Also, we are going to want to make it a bit lazier - preserve the
MR-blocking todo for that.
A handful of lines are being actually moved verbatim,
so --color-moved may help a bit.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are definitely some things wrong with this, but they all have
MR-blocking TODOs so we can promote this type now.
Largely code motion. Review with --color-moved.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Because we have two DirectorySignatureHashAlgo types because of the
macrology problem, we need to introduce temporary conversions, to let
us move code from poc to prod.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
We're going to fix this in this branch, as part of promoting the poc
code to prod.
|
| | | |
| | |
| | |
| | | |
There isn't a "this" here; self is DirectorySignaturesHashesAccu.
|
| | | |
| | |
| | |
| | | |
This doesn't let us do any verification or anything.
|
| | | |
| | |
| | |
| | |
| | | |
This module will be used when we derive ItemValueParseable on
Signature.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And change the type of the field in Signature.
We are going to abandon the almost completely manual parsing approach
taken in poc's NdiDirectorySignature. That parsing approach was
heavily influenced by poc's struct layout, which in turn was
influenced by the way that previously, hashes were inside signatures.
Instead we'll derive ItemValueParseable from Signature, and
semi-manually implement the hash update.
This type is the one that embodies the `directory-signature` item's
parsing strangeness: the optional initial positional argument.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Abolish the parse2_test and encode_test modules. These mostly existed
because of cfg gates.
Now, we can unify the test module namespace, and also remove an
indentation level (that will come next, with rustfmt).
|
| | | | |
|