aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-netdoc test: Add a round-trip test for microdescriptorsIan Jackson2026-06-221-1/+12
| |
* | tor-netdoc: Avoid encoding default values in microdescsIan Jackson2026-06-221-4/+4
| |
* | tor-netdoc: derive encoding for microdescriptorsIan Jackson2026-06-221-2/+2
| | | | | | | | | | | | | | 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.
* | tor-netdoc: Add a TODO for use of include_strIan Jackson2026-06-221-0/+2
| |
* | tor-netdoc: embedded auth certs: Use real vote type, not poc (fmt)Ian Jackson2026-06-221-3/+1
| |
* | tor-netdoc: embedded auth certs: Use real vote type, not pocIan Jackson2026-06-221-3/+1
| |
* | tor-netdoc tests: test vote roundtrip with testdata2Ian Jackson2026-06-222-27/+83
| | | | | | | | | | | | | | | | | | | | | | 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.
* | tor-netdoc tests: Adjust `m` placement in routerdescIan Jackson2026-06-221-0/+12
| |
* | tor-netdoc tests: Adjust shared-rand-* base64 paddingIan Jackson2026-06-221-0/+13
| | | | | | | | | | | | 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.
* | tor-netdoc tests: Make adjust_exp into a trait method (fmt)Ian Jackson2026-06-221-25/+25
| |
* | tor-netdoc tests: Make adjust_exp into a trait methodIan Jackson2026-06-221-9/+33
| | | | | | | | | | | | | | | | 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.
* | tor-netdoc tests: roundtrip_netstatus: Improve an error messageIan Jackson2026-06-221-1/+1
| |
* | tor-netdoc tests: roundtrip_netstatus: Add a useful debug boundIan Jackson2026-06-221-1/+1
| |
* | tor-netdoc tests: netstatus round trips: allow adjusting nowIan Jackson2026-06-221-1/+5
| | | | | | | | | | The vote test files are for the next consensus interval, so we need to verify them at a slightly future time.
* | tor-netdoc tests: Test verification of votes, error casesIan Jackson2026-06-222-1/+84
| |
* | tor-netdoc: Implement verification for votesIan Jackson2026-06-222-3/+139
|/
* tor-netdoc: votes: use EmbeddedCert for the authhcertIan Jackson2026-06-171-1/+1
|
* Merge branch 'consensus-roundtrip' into 'main'Ian Jackson2026-06-174-15/+301
|\ | | | | | | | | Implement encoding and verification for consensuses, and add a round trip test See merge request tpo/core/arti!4100
| * tor-netdoc: consensus_threshold: return a RangeFromIan Jackson2026-06-172-8/+14
| |
| * tor-netdoc: tests: ns parse2 test: Round trip an md consensusIan Jackson2026-06-171-9/+17
| |
| * tor-netdoc: tests: ns parse2 test: Make roundtrip test generic (fmt)Ian Jackson2026-06-171-19/+16
| |
| * tor-netdoc: tests: ns parse2 test: Promote a fudgeIan Jackson2026-06-171-7/+8
| | | | | | | | Microdescriptor consensuses are affected by this same anomaly.
| * tor-netdoc: tests: ns parse2 test: Make roundtrip test genericIan Jackson2026-06-171-15/+42
| | | | | | | | This will let us test microdescriptors and votes with the same code.
| * tor-netdoc: tests: ns parse2 test: Round trip a plain consensusIan Jackson2026-06-172-2/+43
| |
| * tor-netdoc: tests: ns parse2 test: Mess with authcerts in a block (fmt)Ian Jackson2026-06-171-10/+10
| |
| * tor-netdoc: tests: ns parse2 test: Mess with authcerts in a blockIan Jackson2026-06-171-2/+4
| | | | | | | | | | 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.
| * tor-netdoc: tests: ns parse2 test: enable UnknownIan Jackson2026-06-171-1/+2
| |
| * tor-netdoc: tests: ns parse2 test: Use real document type (fmt)Ian Jackson2026-06-171-3/+2
| |
| * tor-netdoc: tests: ns parse2 test: Use real document typeIan Jackson2026-06-171-4/+4
| |
| * tor-netdoc: tests: Move ns poc tests to netstatus.rsIan Jackson2026-06-171-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * tor-netdoc: tests: Move poc authcert test to authcert.rsIan Jackson2026-06-171-0/+18
| | | | | | | | | | | | | | | | 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
| * tor-netdoc: un-cfg-gate some use'sIan Jackson2026-06-171-5/+2
| | | | | | | | | | 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.
| * tor-netdoc: provide verify methods on new consensus types (fmt)Ian Jackson2026-06-171-3/+2
| |
| * tor-netdoc: provide verify methods on new consensus typesIan Jackson2026-06-172-2/+116
| |
| * tor-netdoc: Break out consensus_threshold fnIan Jackson2026-06-172-3/+31
| | | | | | | | This calculation appeared 3 times.
| * tor-netdoc: NetworkStatus: derive EncodeIan Jackson2026-06-171-1/+1
| |
* | Merge branch 'ntor-cc-rd' into 'main'Ian Jackson2026-06-171-5/+20
|\ \ | |/ |/| | | | | Add ntor onion key cross certificate to RouterDesc See merge request tpo/core/arti!4109
| * tor-netdoc: Create NtorOnionKeyCrossCert at better placeClara Engler2026-06-171-9/+9
| | | | | | | | | | | | This commit moves the construction place for the NtorOnionKeyCrossCert from the final RouterDesc construction to the crosscert code block, which should be more correct.
| * tor-netdoc: Add ntor_onion_key_crosscert to RouterDescClara Engler2026-06-151-0/+12
| | | | | | | | | | This commit adds ntor_onion_key_crosscert to RouterDesc as well as integrating it into the legacy parser.
| * tor-netdoc: Extract ntor bit and cert in legacy parser (fmt)Clara Engler2026-06-151-3/+6
| | | | | | | | No functional change.
| * tor-netdoc: Extract ntor bit and cert in legacy parserClara Engler2026-06-151-3/+3
| | | | | | | | We will soon need it for the ntor cross certificate.
* | tor-netdoc: Add ItemValueEncodable for RelayPlatformClara Engler2026-06-161-0/+13
| |
* | tor-netdoc: Implement ItemValueParseable instead for RelayPlatformClara Engler2026-06-161-4/+6
| | | | | | | | | | ItemArgumentParseable does not make much sense because the field is effectively a free-form field similar to ContactInfo.
* | Merge branch 'fix-authcert' into 'main'Clara Engler2026-06-161-1/+2
|\ \ | |/ |/| | | | | tor-netdoc: fix EncodedAuthCert parsing See merge request tpo/core/arti!4104
| * tor-netdoc: fix EncodedAuthCert parsingIan Jackson2026-06-151-1/+2
| | | | | | | | | | | | | | | | | | 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.
* | tor-netdoc: rs.rs: tidy importsIan Jackson2026-06-151-2/+3
| |
* | tor-netdoc: routerstatus entries: Add `stats` item (votes only)Ian Jackson2026-06-154-1/+8
|/
* tor-netdoc: Rename variants in VerifyGeneralTrustedAuthorities (fmt)Ian Jackson2026-06-111-3/+1
|
* tor-netdoc: Rename variants in VerifyGeneralTrustedAuthoritiesIan Jackson2026-06-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)]`
* Merge branch 'verify-general' into 'main'Ian Jackson2026-06-112-51/+232
|\ | | | | | | | | tor-netdoc: overhaul consensus verification, in preparation for parse2 ns verification See merge request tpo/core/arti!4065