aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: DirSource: add missing hostname fieldIan Jackson2026-04-272-0/+11
|
* tor-netdoc: DirSource: fix type of identity fieldIan Jackson2026-04-272-3/+4
|
* tor-netdoc: DirSource: fix type of nickname fieldIan Jackson2026-04-272-3/+9
|
* tor-netdoc: DirSource: add spec urlIan Jackson2026-04-271-0/+1
|
* tor-netdoc: DirSource: add some blank linesIan Jackson2026-04-271-0/+4
| | | | This makes the struct more legible.
* tor-netdoc: EncodedAuthCert: implement NetdocEncodableIan Jackson2026-04-271-0/+13
|
* tor-netdoc: Add RouterDescSignatures typeClara Engler2026-04-231-1/+24
| | | | | This commit implements the RouterDescSignatures type that carries the signatures for the yet to be derived RouterDescUnverified.
* tor-netdoc: Gate authcert/encoded.rs and poc behind incomplete and ↵Ian Jackson2026-04-232-1/+5
| | | | | | | | | 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.
* tor-netdoc: Tidy use's in authcert.rsIan Jackson2026-04-231-9/+5
|
* tor-netdoc: Un-gate parse2 and encode in authcert.rsIan Jackson2026-04-231-31/+5
|
* tor-netdoc: Add spec link to RouterDescClara Engler2026-04-221-0/+4
| | | | This commit adds a specification link to the RouterDesc struct.
* tor-netdoc: ItemArgumentParseable for RelayPlatformClara Engler2026-04-221-0/+12
| | | | | This commit implements ItemArgumentParseable for RelayPlatform which we will need in the parse2 version of RouterDesc eventually.
* tor-netdoc: Minimally avoid emitting bad netparams keywordsIan Jackson2026-04-211-1/+36
| | | | | See torspec#401 and https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397715
* tor-netdoc: Fix c&p error in commentIan Jackson2026-04-211-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397714
* tor-netdoc: Move the proto_statuses_parse2_encode module laterIan Jackson2026-04-211-88/+87
| | | | | | | 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.
* tor-netdoc: ns Premable: add missing field known_flagsIan Jackson2026-04-215-1/+9
|
* tor-netdoc: ns Preamble: derive NetdocEncodableFieldsIan Jackson2026-04-211-0/+1
|
* tor-netdoc: ns Preamble: Use ConstructorIan Jackson2026-04-213-1/+16
|
* tor-netdoc: ns Preamble: use new deftly cfg approachIan Jackson2026-04-211-10/+8
|
* tor-netdoc: DocRelayFlags: rename VoteRepr to NoImplicitReprIan Jackson2026-04-211-1/+1
|
* tor-netdoc: DocRelayFlags: rename helper structIan Jackson2026-04-211-1/+1
| | | | This is going to be used for encoding too.
* tor-netdoc: impl NetdocEncodableFields for ProtoStatusesIan Jackson2026-04-211-1/+15
| | | | We don't need the helper struct for this.
* tor-netdoc: Split out proto_statuses_parse2_encode moduleIan Jackson2026-04-211-9/+24
| | | | | | | | | | | | | | 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.
* tor-netdoc: impl ItemValueEncodable for NetParams<i32>Ian Jackson2026-04-211-0/+22
| | | | | | Start a new encode_impls module. The pub(super) will be used in a moment.
* tor-netdoc: ns Lifetime: derive NetdocEncodableFieldsIan Jackson2026-04-211-0/+1
|
* tor-netdoc: ns Lifetime: Use ConstructorIan Jackson2026-04-211-5/+19
|
* tor-netdoc: ns Lifetime: use new deftly cfg approachIan Jackson2026-04-211-3/+5
| | | | This is what we did for authcert.rs and it worked well there.
* tor-netdoc: ConsensusMethods: derive ItemValueEncodableIan Jackson2026-04-211-2/+3
|
* tor-netdoc: Fix type of NotPresent items in ns PreambleIan Jackson2026-04-213-6/+8
|
* tor-netdoc: Make Nickname have its own parsing error typeIan Jackson2026-04-203-3/+10
| | | | | | | | 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.
* Merge branch 'netdoc-test-fix' into 'main'Clara Engler2026-04-082-191/+181
|\ | | | | | | | | Fix the testdata2 situation See merge request tpo/core/arti!3861
| * tor-netdoc: Add manual happy families microdesc testClara Engler2026-04-081-0/+35
| | | | | | | | | | | | | | 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.
| * tor-netdoc: Adjust family values for microdesc testClara Engler2026-04-081-12/+1
| | | | | | | | | | This commit adjust the family value for the microdesc test to the one actually found in testdata2/.
| * tor-netdoc: Update microdesc test EC keysClara Engler2026-04-081-9/+8
| | | | | | | | | | | | 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.
| * tor-netdoc: Update microdesc test onion keyClara Engler2026-04-081-5/+5
| | | | | | | | | | This commit updates the microdesc onion key with the new one from testdata2.
| * tor-netdoc: "Remove" assert_eq for mds[6]Clara Engler2026-04-081-40/+0
| | | | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: No longer ignore microdesc parse2 testClara Engler2026-04-081-2/+0
| |
| * tor-netdoc: Remove dead authcert test codeClara Engler2026-04-081-29/+0
| | | | | | | | | | This removes unused imports as well as the read_b64 and to_der helper functions which are all no longer used.
| * tor-netdoc: Update dir_auth_cross_cert() test caseClara Engler2026-04-081-1/+12
| | | | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Update invalid outer signature test caseClara Engler2026-04-081-10/+7
| | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Update the invalid cross-cert test caseClara Engler2026-04-081-10/+7
| | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Update inconsistent fingerprint test caseClara Engler2026-04-081-7/+9
| | | | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Constify ALTERNATIVE_AUTHCERT_RAWClara Engler2026-04-081-0/+5
| | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Update "trivial" test cases in dir_auth_signature()Clara Engler2026-04-081-50/+20
| | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Constify VALID_SYSTEM_TIMEClara Engler2026-04-081-0/+5
| | | | | | | | | | | | 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.
| * tor-netdoc: Update test vectors in dir_auth_certClara Engler2026-04-081-15/+10
| | | | | | | | | | | | | | | | | | | | | | 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.
| * tor-netdoc: Remove outdated longclaw comment in testClara Engler2026-04-081-2/+0
| |
| * tor-netdoc: Replace a File::open with include_strClara Engler2026-04-081-7/+2
| | | | | | | | | | This commit replaces a File::open with the AUTHCERT_RAW constant in the dir_auth_cert test because that is obviously less error prone.
| * tor-netdoc: Constify the raw authcert test vectorClara Engler2026-04-081-0/+1
| | | | | | | | | | | | | | 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.
| * tor-netdoc: Constify the authcert test vectorsClara Engler2026-04-081-0/+41
| | | | | | | | | | This commit constifies the authcert test vectors by extracting them from testdata2/keys/authority_certificate.