aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse2/signatures.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: parse2: Deprecate check_validity_timeIan Jackson2026-06-101-0/+3
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4070#note_3422637 We must allow it in poc, but poc is a thing we're trying to abolish/replace, so that's OK.
* tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverifiedIan Jackson2026-06-021-7/+7
| | | | | | | | | | | | The NetdocParseableUnverified derive macro implements this trait (amongst other things). Traits and derive macros should have aligned names. This is only used for parsing, so let's keep the "Parseable" part of the name. I don't think the effort of deprecated alias, for downstream compatibility, is worth it, our compatibility policy notwithstanding.
* tor-netdoc: parse2/encode derive: Show unquoted attributes in the docsIan Jackson2026-04-071-1/+1
|
* tor-netdoc: signature orderliness: add some xrefsIan Jackson2026-03-191-1/+3
|
* 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-191-6/+6
| | | | | | "Regular" is confusing, especially since in American English it tends to mean "usual" - whereas, there are no orderly signatures in Tor netdocs.
* tor-netdoc: parse2: Include body length in SignaturesDataIan Jackson2026-03-191-0/+3
| | | | | 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-191-0/+22
| | | | Such an impl is a footgun. Explain this in docs & comments.
* tor-netdoc: parse2: Unify top-level derive as NetdocUParseablenverifiedIan Jackson2026-03-191-1/+1
| | | | | | | | | | | | | | | | 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: Move hash out of signature itemsIan Jackson2026-03-191-11/+117
| | | | | | | | | | 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-191-4/+7
| | | | | Nonfunctional and formatting changes which reduce noise in the next commit.
* tor-netdoc: parse2: SignatureHashInputs: Include document so farIan Jackson2026-03-191-0/+3
|
* tor-netdoc: parse2: Introduce SignatureData structIan Jackson2026-03-191-4/+21
| | | | This is going to contain body information, and the hashes, too.
* tor-netdoc: NetdocParseableSignatures: Make into its own traitIan Jackson2026-03-191-0/+18
|
* 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: Lengthen a doc comment slightlyIan Jackson2026-03-031-1/+1
|
* tor-netdoc: Rename *Signed to *UnverifiedIan Jackson2026-03-031-5/+5
| | | | | | | | | | 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-031-0/+32
| | | | | I keep not finding it because all the other signatures stuff is in signatures.rs.
* tor-netdoc: Implement new authority certificatesClara Engler2025-12-041-0/+18
| | | | | | | | | This commit implements directory authority certificates using the `parse2` approaches. For now, those are in a module `doc::authcert::tmp`, with the eventual goal of moving it into its super module after removing/deprecating the legacy types.
* tor-netdoc: Introduce parse2, new parserIan Jackson2025-08-141-0/+112
This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment.