| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This makes the struct more legible.
|
| | |
|
| |
|
|
|
| |
This commit implements the RouterDescSignatures type that carries the
signatures for the yet to be derived RouterDescUnverified.
|
| |
|
|
|
|
|
|
|
| |
plain-consensus
"incomplete" is correct since encoded authcert depends on votes.
"plain-consensus" is going backwards, but stripping "plain-consensus"
gates from everything will be very intrusive.
|
| | |
|
| | |
|
| |
|
|
| |
This commit adds a specification link to the RouterDesc struct.
|
| |
|
|
|
| |
This commit implements ItemArgumentParseable for RelayPlatform which we
will need in the parse2 version of RouterDesc eventually.
|
| |
|
|
|
| |
See torspec#401 and
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397715
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397714
|
| |
|
|
|
|
|
| |
Now it follows, rather than precedes, the parse2_impls and
encode_impls modules that it imports things from.
Pure code motion apart from deleting the todo.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is going to be used for encoding too.
|
| |
|
|
| |
We don't need the helper struct for this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're going to want this macrology to generate a encoder
implmeentation too. It's most convenient to make this its own module,
separating it from parse2_impls.
Enable the module if encoding is enabled, decorating its
parsing-related contents with the appropriate cfg.
Use pub(super) to export the encoding-related imports, so that we
don't end up with endlessly duplicated import lists.
Now there is place where we can put the encoder.
|
| |
|
|
|
|
| |
Start a new encode_impls module.
The pub(super) will be used in a moment.
|
| | |
|
| | |
|
| |
|
|
| |
This is what we did for authcert.rs and it worked well there.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Fix the testdata2 situation
See merge request tpo/core/arti!3861
|
| | |
| |
| |
| |
| |
| |
| | |
This commit adds a manual test case for happy families in microdesc with
parse2. Manual in the sense that we hardcode a microdescriptor taken
from the wild here, as testdata2 does not contain them at the current
moment, which is unfortunate but reported.
|
| | |
| |
| |
| |
| | |
This commit adjust the family value for the microdesc test to the one
actually found in testdata2/.
|
| | |
| |
| |
| |
| |
| | |
This commit updates the microdesc test EC keys with the new ones from
testdata2/ while also changing the encoding from a byte array to the
base64 value found in the microdesc itself.
|
| | |
| |
| |
| |
| | |
This commit updates the microdesc onion key with the new one from
testdata2.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit removes the assert_eq for mds[6]. The reason for this was
to have a test case with happy families set. However, these values were
manually hacked into the respective file which is not the correct way.
Instead, we will test this in a separate test that will be added later,
as the current testdata2/ is not capable of this. This is an already
reported chutney issue.
|
| | | |
|
| | |
| |
| |
| |
| | |
This removes unused imports as well as the read_b64 and to_der helper
functions which are all no longer used.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit updates the dir_auth_cross_cert() test case with the new
constants, replacing the longclaw ones.
The replacement also involves a slight refactoring on the way how we
obtain the encoded and decoded variable, namely because we have the data
in a PEM encoded string now and no longer in separate file, making the
use of read_b64 impossible.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit updates the invalid outer signature test case by copying the
outer signature of the alternative certificate into our test object,
which should obviously render this to a failure.
It also updates the test vectors to the constant ones because it moves
away from longclaw.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit updates the invalid cross-cert test case by copying the
cross-cert from the alternative cert into our test object, resulting in
a failure.
Of course this also updates the other test vectors to use the constants
declared above, as this moves away from longclaw.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit updates the inconsistent fingerprint test case that tests
whether the fingerprint matches with the identity RSA key. For this, we
load the alternative authority cert and move its identity key into the
identity key of the canonical cert.
Of course, this also replaces the other test vectors that are now
required for this change because it moves away from longclaw.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This commit adds a new constant to the parse2 authcert unit tests,
ALTERNATIVE_AUTHCERT_RAW, with the idea being to be different than
AUTHCERT_RAW, which we will utilize in order to mix up cross-cert
objects from one authcert with the one of another one in order to see it
fail.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This commit updates the "trivial" test cases in the dir_auth_signature
unit tests, namely the ones concerning the outer signature as well as
the timestamp tolerance. A follow-up commit will also update the more
tricky ones, such as the ones testing inconsistent cross-certificates,
etc.
|
| | |
| |
| |
| |
| |
| | |
This commit constifies VALID_SYSTEM_TIME, a timestamp indicating a point
in time at which the certificate is valid. We will need this to test
timestamp validation.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit replaces the longclaw test vectors in dir_auth_cert with the
ones we constified previously and represent the ones found in
testdata2/.
It may look a bit odd that we replaced the file includes for the public
keys but this is because those files should have never existed in
testdata2/ in the first place and were only added by accident, meaning
that the current approach is the correct one.
|
| | | |
|
| | |
| |
| |
| |
| | |
This commit replaces a File::open with the AUTHCERT_RAW constant in the
dir_auth_cert test because that is obviously less error prone.
|
| | |
| |
| |
| |
| |
| |
| | |
This commit adds `const AUTHCERT_RAW` which `include_str`'s the actual
raw authcert we will use for parsing test purposes. The reason for that
being that a single include_str! of the same file is obviously better
than multiple ones.
|
| | |
| |
| |
| |
| | |
This commit constifies the authcert test vectors by extracting them from
testdata2/keys/authority_certificate.
|