| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
All these types already have parsing derives.
The encoding isn't quite right yet. It's legal, but doesn't match C
Tor as well as we'd like.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use roundtrip_netstatus, which does nearly all of the work for us.
But for it to round-trip, we must do a bunch of fudging.
This replaces the old parse2 vote test case (which used the poc type).
The test case has some adjustments to cope with missing fields. Move
the TODOs for those fields to the test case, so that they're on lines
that will be deleted when the fields are implemented.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Right now we're working on votes, but the same issue arises in
consensuses; we just haven't noticed yet because the testdata2
consensus doesn't have an SRV.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
In the future (not quite yet in this branch), there will be tests that
want to use roundtrip_netstatus for other test files.
We'll want to be able to reuse the per-document-specific munging. So
make that into a trait. And document roundtrip_netstatus.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
The vote test files are for the next consensus interval, so we need to
verify them at a slightly future time.
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| |
| |
| | |
Implement encoding and verification for consensuses, and add a round trip test
See merge request tpo/core/arti!4100
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Microdescriptor consensuses are affected by this same anomaly.
|
| | |
| |
| |
| | |
This will let us test microdescriptors and votes with the same code.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This avoids rebinding file and text and input to the authcerts.
We're going to want to use at least some of those values later.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We're going to turn these into full-on round-trip tests for both
flavours of consensus.
We must temporarily bodge the more comprehensive test, for plain con
sensuses, to to still use the actual document type from poc. That
allows us to avoid changing the arguments to verify() etc. (poc's
verify is subtly different to the real NetworkStatus's.)
When these tests were in poc, they were gated by the incomplete cfg on
the whole of poc. Now they have one each.
Almost entirely code motion; review with
git show --color-moved --color-moved-ws=allow-indentation-change
|
| | |
| |
| |
| |
| |
| |
| |
| | |
There is no separate poc authcert type any more. This is a perfectly
fine test case.
Almost entirely code motion; review with
git show --color-moved --color-moved-ws=allow-indentation-change
|
| | |
| |
| |
| |
| | |
We have the #1645 allow at the top of lib.rs, so this is unnecessary
bureaucracy. Let's simplify this before adding more to it.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
This calculation appeared 3 times.
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
Add ntor onion key cross certificate to RouterDesc
See merge request tpo/core/arti!4109
|
| | |
| |
| |
| |
| |
| | |
This commit moves the construction place for the NtorOnionKeyCrossCert
from the final RouterDesc construction to the crosscert code block,
which should be more correct.
|
| | |
| |
| |
| |
| | |
This commit adds ntor_onion_key_crosscert to RouterDesc as well as
integrating it into the legacy parser.
|
| | |
| |
| |
| | |
No functional change.
|
| | |
| |
| |
| | |
We will soon need it for the ntor cross certificate.
|
| | | |
|
| | |
| |
| |
| |
| | |
ItemArgumentParseable does not make much sense because the field is
effectively a free-form field similar to ContactInfo.
|
| |\ \
| |/
|/|
| |
| | |
tor-netdoc: fix EncodedAuthCert parsing
See merge request tpo/core/arti!4104
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
It would swallow the whole rest of the document, leading to bizarre
output on re-encoding.
There is no test case for this in-tree (which is why this is cfg
"incomplete"), but I have a full roundtrip test of a vote (which
contains an authcert) in a wip branch, which detected this problem.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a wip branch I added a variant, and clippy complained. In this
case, I agree with clippy.
warning: all variants have the same postfix: `Authorities`
--> crates/tor-netdoc/src/doc/netstatus.rs:2335:1
|
2335 | / pub(crate) enum VerifyGeneralTrustedAuthorities<'r> {
2336 | | /// Trust these authorities.
2337 | | TrustTheseAuthorities {
2338 | | /// The HKP_auth_id_rsa
... |
2357 | | },
2358 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#enum_variant_names
note: the lint level is defined here
--> crates/tor-netdoc/src/lib.rs:9:9
|
9 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::enum_variant_names)]` implied by `#[warn(clippy::all)]`
|
| |\
| |
| |
| |
| | |
tor-netdoc: overhaul consensus verification, in preparation for parse2 ns verification
See merge request tpo/core/arti!4065
|