summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* Plumb web-time-compat/full dependency through everywhere.Ian Jackson2026-03-301-0/+1
| | | | As generated by maint/fixup-features.
* tor-netdoc: Port to web-time-compatNick Mathewson2026-03-264-5/+8
|
* Revert "parse2: Rename lno_for_error to lno"Clara Engler2026-03-253-4/+3
|
* parse2: Rename lno_for_error to lnoClara Engler2026-03-253-3/+4
| | | | | This commit lno_for_error in ItemStream to lno because its value may not always be used for error handling, such as in tor-consdiff.
* parse2: Implement `ParseError::new()`Clara Engler2026-03-251-0/+19
| | | | | | | | | This commit adds the ParseError::new() method, which allows external APIs to construct a ParseError, which is currently not possible due to non-exhaustiveness, despite the member fields being public. It is required for external applications using lower-level but public parse2 APIs, such as ItemStream's.
* Fix typosTobias Stoeckmann2026-03-2413-18/+18
| | | | Typos found with codespell
* tor-netdoc: signature orderliness: add some xrefsIan Jackson2026-03-192-1/+6
|
* tor-netdoc: signature ordering: discuss an alternative impl approachIan Jackson2026-03-191-0/+3
| | | | Suggested-by: Clara Engler <[email protected]>
* tor-netdoc: signature orderliness: orderly signs don't cover other sigsIan Jackson2026-03-191-0/+1
| | | | | This is implied by `body` being the body before the first signature item, but needs to be part of the definition.
* tor-netdoc: signature orderliness: shuffle wording slightlyIan Jackson2026-03-191-1/+1
|
* tor-netdoc: signature orderliness: change terminologyIan Jackson2026-03-192-8/+8
| | | | | | "Regular" is confusing, especially since in American English it tends to mean "usual" - whereas, there are no orderly signatures in Tor netdocs.
* tor-netdoc: NetdocParseableSignatures: discuss orderingIan Jackson2026-03-191-0/+44
|
* tor-netdoc: Apply deferred rustfmt churn to importsIan Jackson2026-03-193-7/+7
|
* tor-netdoc: encoding: Plan for encoding signed documentsIan Jackson2026-03-191-0/+23
|
* tor-netdoc: parse2: Add some navigational commentsIan Jackson2026-03-191-1/+64
| | | | I have been losing my way in this file a lot. This may help.
* tor-netdoc: parse2: Include body length in SignaturesDataIan Jackson2026-03-192-0/+5
| | | | | This could allow users to attach and detach signatures, hash (only) the body part, etc.
* tor-netdoc: parse2: Don't impl NetdocParseable for bodies of signed docsIan Jackson2026-03-196-16/+105
| | | | Such an impl is a footgun. Explain this in docs & comments.
* tor-netdoc: parse2: Don't impl NetdocParseable for bodies of signed docs ↵Ian Jackson2026-03-192-4/+11
| | | | (pre-fmt)
* tor-netdoc: authcert test: Avoid using NetdocParseable for AuthCertIan Jackson2026-03-191-3/+4
| | | | | | | | | We want to stop deriving NetdocParseable directly for body structs. This test case does in fact parse a signed authcert and extract just the body without verifying the signatures. That's fine in a test, but we're going to make it involve some hoop-jumping. So, jump those hoops.
* tor-netdoc: parse2: Unify top-level derive as NetdocUParseablenverifiedIan Jackson2026-03-195-37/+40
| | | | | | | | | | | | | | | | Replace the two separate NetdocParseable and NetdocUnverified derives, for toplevel signed documents, with a single derive. This makes the derive API simpler. It will also make it reasonably possible to avoid deriving NetdocParseable directly for body structs. Such impls are a security hazard! In detail: * Rename NetdocUnverified to NetdocParseableUnverified * Have it use $IMPL_NETDOC_PARSEABLE from the NetdocParseable deftly module so that it derives NetdocParseable for the body. (We'll change this later in the series.) * Adjust the docs and all call sites.
* tor-netdoc: parse2: Break out IMPL_NETDOC_PARSEABLE in a deftly moduleIan Jackson2026-03-191-161/+175
| | | | | We are going to want to reuse this parsing implementation in another top-level deftly template.
* tor-netdoc: parse2: Move hash out of signature items (fmt)Ian Jackson2026-03-191-17/+19
| | | | | Run rustfmt and selectively apply the hunks that are relevant to the previous commit.
* tor-netdoc: parse2: Move hash out of signature itemsIan Jackson2026-03-1912-84/+264
| | | | | | | | | | During encoding, including these hashes in the signature items makes no sense. The hashes are an *input* to the signature items, but not part of them. Move the hashes out of the items. Instead, provide each signatures section type with a hash accumulator type, in which the hash(es) are stored.
* tor-netdoc: parse2: Move hash out of signature items (prep)Ian Jackson2026-03-193-13/+22
| | | | | Nonfunctional and formatting changes which reduce noise in the next commit.
* tor-netdoc: parse2: SignatureHashInputs: Include document so farIan Jackson2026-03-192-0/+5
|
* tor-netdoc: parse2: Introduce SignatureData structIan Jackson2026-03-198-32/+57
| | | | This is going to contain body information, and the hashes, too.
* tor-netdoc: NetdocParseableSignatures: Make into its own traitIan Jackson2026-03-195-23/+26
|
* tor-netdoc: NetdocParseableSignatures: Make into its own macroIan Jackson2026-03-195-32/+125
| | | | | | This is going to be its own trait and it is usually best if macros are named after traits, rather than having the macro derive a different trait depending on meta attributes.
* tor-netdoc: Add VerifyFailed::BugIan Jackson2026-03-191-0/+3
| | | | | We're going to want this for cases where the hash computation machinery didn't DTRT.
* tor-netdoc: Provide AsMutSelf derive macroIan Jackson2026-03-192-1/+43
| | | | We're going to want this for sets of netdoc signature hashes.
* tor-netdoc: parse2 derive: break out INIT_ACCUMULATE_VARSIan Jackson2026-03-191-17/+25
| | | | For reuse when we split up the NetdocParseable derive.
* tor-netdoc: parse2: netstatus poc: Improve docs slightlyIan Jackson2026-03-191-0/+3
|
* tor-netdoc: parse2: Give reference to what a Regular signature isIan Jackson2026-03-191-0/+2
| | | | But, all signatures in the current protocol are irregular :-/.
* tor-netdoc: parse2: Fix an error messageIan Jackson2026-03-191-1/+1
|
* Merge branch 'extra-info' into 'main'Clara Engler2026-03-182-0/+7
|\ | | | | | | | | tor-dirclient: Support for extra-info requests See merge request tpo/core/arti!3764
| * tor-netdoc: Add TODO wrt double definitionClara Engler2026-03-181-0/+1
| |
| * tor-netdoc: Properly export ExtraInfoDigestClara Engler2026-03-121-0/+3
| |
| * tor-netdoc: Add ExtraInfoDigest type aliasClara Engler2026-03-121-0/+3
| | | | | | | | Accidentally left out in the previous commit.
* | Fix word duplicate typosTobias Stoeckmann2026-03-155-6/+6
|/
* parse2: Add TODO for netstatus traitClara Engler2026-03-091-0/+5
| | | | | This commit adds a TODO to implement a trait combining the common fields in a network status documents.
* Merge branch 'signature-rework-rename-signed' into 'main'Clara Engler2026-03-0513-147/+92
|\ | | | | | | | | tor-netdoc parse2: Rename *Signed to *Unverified See merge request tpo/core/arti!3742
| * tor-netdoc: Fix typo in docsIan Jackson2026-03-041-1/+1
| |
| * tor-netdoc: Apply rustfmt churnIan Jackson2026-03-033-11/+5
| |
| * tor-netdoc: parse2: Lengthen a doc comment slightlyIan Jackson2026-03-031-1/+1
| |
| * tor-netdoc: parse2: Use eprint for dtraceIan Jackson2026-03-032-5/+8
| |
| * tor-netdoc: Rename *Signed to *UnverifiedIan Jackson2026-03-0312-51/+52
| | | | | | | | | | | | | | | | | | | | This was a weird name, and while working in this area it all seemed to make the docs strange. Rename it. This is quite invasive! In theory we could have the macros generate compatibility aliases, but that seems quite complex.
| * tor-netdoc: Move NetdocSigned to signatures.rsIan Jackson2026-03-034-34/+36
| | | | | | | | | | I keep not finding it because all the other signatures stuff is in signatures.rs.
| * tor-netdoc: Drop dir_auth_key_cert_signatures test caseIan Jackson2026-03-031-56/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This test case constructs a "netdoc" which consists of one dir-key-certification item, and parses it using `AuthCertSignatures as NetdocParseable`. But we're going to split out the parsing trait for signatures sections, so that's not going to work any more. This test tests only corner cases of the derived SignatureItemParseable implementation; but that's unit tested in the parse2 tests. (Once upon a time there was perhaps manual parsing code which needed a specific test.) Remove it.
* | Bump strum to 0.28Gabriela Moldovan2026-03-041-1/+1
|/