aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-netdoc: Add test for default deny encoding of AddrPolicyClara Engler2026-06-181-0/+28
| |
* | tor-netdoc: Round-trip encoding test for AddrPolicyClara Engler2026-06-181-1/+8
| |
* | tor-netdoc: Derive NetdocEncodable in unit testClara Engler2026-06-181-1/+1
| |
* | tor-netdoc: Replace Ignored with () in AddrPolicy testClara Engler2026-06-181-5/+2
| | | | | | | | () implements encodable which we will derive soon.
* | tor-netdoc: Add NetdocEncodableFields for AddrPolicyClara Engler2026-06-181-0/+35
| | | | | | | | | | This commit implements NetdocEncodableFields for AddrPolicy in a non-trivial fashion. A unit test will be added in a moment.
* | tor-netdoc: Make some policy methods constClara Engler2026-06-182-3/+3
|/ | | | | | This commit makes some policy related constructor functions constant, so we can use them in const expressions, which will be required for the next commit.
* Merge branch 'derive-depr' into 'main'Clara Engler2026-06-182-0/+5
|\ | | | | | | | | tor-netdoc: derives: allow handling deprecated fields See merge request tpo/core/arti!4118
| * tor-netdoc: constructor derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+1
| | | | | | | | We must generally set such a field to the default.
| * tor-netdoc: parse2 derive: allow setting deprecated fieldsIan Jackson2026-06-161-0/+4
| | | | | | | | | | | | | | | | | | This makes it possible to derive from a struct with deprecated fields, without triggering the warning. This doesn't yet treat encoding as yet, because the only deprecated field I encountered was `skip` which means the derived encoder never mentions it.
* | tor-netdoc: votes: use EmbeddedCert for the authhcertIan Jackson2026-06-172-2/+6
| |
* | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert) (fmt)Ian Jackson2026-06-171-2/+7
| |
* | tor-netdoc: EmbeddedCert: support whole netdocs (for AuthCert)Ian Jackson2026-06-171-2/+33
| |
* | Merge branch 'consensus-roundtrip' into 'main'Ian Jackson2026-06-177-100/+309
|\ \ | | | | | | | | | | | | 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: Add regsub utility functionIan Jackson2026-06-171-0/+8
| | | | | | | | | | | | | | | We're going to need this for fudges in round trip tests of consensuses etc.
| * | 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-173-70/+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-172-16/+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: poc tests: drop some unneeded &'sIan Jackson2026-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | clippy complains (clippy::needless_borrows_for_generic_args). In poc, we have an allow with a TODO asking for this to be done generally in the Arti codebase. Let's postpone shaving that yak.
| * | tor-netdoc: poc tests: use normal names for authcertsIan Jackson2026-06-171-6/+4
| | |
| * | tor-netdoc: poc tests: simulate normal outside-poc variety module namesIan Jackson2026-06-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to reuse/move this test code. Ie, it is going to be testing the real network document types. The naming outside poc is different. To make future diffs a bit less noisy, change some type names in the test code and fudge it up with a use.
| * | 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 'sp-fingerprint-encode' into 'main'Clara Engler2026-06-171-5/+31
|\ \ \ | | | | | | | | | | | | | | | | Encode for SpFingerprint See merge request tpo/core/arti!4116
| * | | tor-netdoc: Round-trip test SpFingerprint encodingClara Engler2026-06-171-1/+12
| | | | | | | | | | | | | | | | | | | | This commit adds a round-trip encoding for SpFingerprint to the already existing parsing test.
| * | | tor-netdoc: Small SpFingerprint test refactoringClara Engler2026-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | Do not shadow s and provide access to Wrapper instead of just the inner fingerprint. We will make use of this soon.
| * | | tor-netdoc: Encode for SpFingerprintClara Engler2026-06-171-0/+15
| |/ / | | | | | | | | | | | | Implements encode::ItemArgument for SpFignerprint. A test will be added in the next commit.
* | | Merge branch 'ntor-cc-rd' into 'main'Ian Jackson2026-06-172-7/+24
|\ \ \ | |/ / |/| | | | | | | | 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: Make dangerous_new_unverified available outside testsClara Engler2026-06-151-2/+4
| | | | | | | | | | | | | | | We will need it for compatibility with the legacy parser soon. Not super nice.
* | | tor-netdoc: ItemValueEncodable for ExtraInfoDigestsClara Engler2026-06-171-1/+1
| | |
* | | tor-netdoc: ItemValueEncodable for RouterDescIntroItemClara Engler2026-06-171-1/+1
| | |
* | | tor-netdoc: ItemValueEncodable for OverloadGeneralClara Engler2026-06-171-1/+1
| | |
* | | Merge branch 'display-range' into 'main'Clara Engler2026-06-172-24/+61
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: port policies: Encode with reject if it's shorter See merge request tpo/core/arti!4108
| * | tor-netdoc: placate clippyIan Jackson2026-06-161-1/+1
| | |