summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: implement encoding function for raw_data_objectIan Jackson2026-04-011-1/+10
|
* tor-netdoc: Move raw_data_object to new container moduleIan Jackson2026-04-015-12/+20
| | | | This will allow us to use it for encoding as well as parsing.
* tor-netdoc: impl encoding traits for authcert cross-cert typesIan Jackson2026-04-011-1/+19
|
* tor-netdoc: impl encoding traits for rsa::PublicKeyIan Jackson2026-04-012-0/+28
|
* tor-netdoc: Provide ItemEncoder::text_sofar()Ian Jackson2026-04-012-0/+6
|
* tor-netdoc: Provide ItemEncoder::object() taking an ItemObjectEncodableIan Jackson2026-04-013-0/+18
|
* tor-netdoc: impl From<RsaIdentity> for the fingerprint typesIan Jackson2026-04-012-4/+9
|
* tor-netdoc: encode derive: Fix handling of optionality.Ian Jackson2026-04-011-7/+3
| | | | | We mustn't use selector.selector() because that's for multiplicity, not optionality. In pracctice, it goes wrong with Vec<u8>.
* tor-netdoc: encode derive: Use paste_spanned to improve an error messageIan Jackson2026-04-011-1/+3
|
* tor-netdoc: Fix a wrong "what does this end" commentIan Jackson2026-04-011-1/+1
| | | | This was a c&p error, I think.
* tor-netdoc: authcert: Debug CrossCertObject in hexIan Jackson2026-04-011-1/+3
|
* tor-netdoc: Constructor: Fix it so it actually worksIan Jackson2026-04-012-5/+5
| | | | | | The hidden __non_exhaustive field has to be pub. And, fix the use site, currently AuthCert.
* tor-netdoc: encode: re-export netdoc_ordering_check for macrosIan Jackson2026-04-011-0/+1
| | | | Otherwise deriving NetdocEncodable doesn't work outside this crate.
* tor-netdoc: encode derive: Use $P for ResultIan Jackson2026-03-311-1/+1
|
* tor-netdoc: Fix typo in doc commentIan Jackson2026-03-311-1/+1
|
* tor-netdoc: Rename `AuthCertUnverified::verify_self_signed`Ian Jackson2026-03-313-15/+18
| | | | | | | | | | | This method verifies all the signatures, and checks that the signing authority is in the provided list. Anyway, authcerts aren't really self-signed: they're a signature by KS_auth_id_rsa on KP_auth_sign_rsa. Note that there is also a `verify_selfcert` method which does only some of the checks, and has some code duplication. That will be cleaned up later.
* tor-netdoc: encoder: Rename .object() method to .object_bytesIan Jackson2026-03-316-12/+13
| | | | | | | | | | | With the introduction of the derives for document encoding, we now have a trait ItemObjectEncodable. We will want a method on ItemEncoder that takes an ItemObjectEncodable, and that should be called `object` since it's a better approach than working ad-hoc with tor_bytes::Writeable. (For example, an ItemObjectEncodable knows its own label.) So, rename `object` to `object_bytes`.
* Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | There are no breaking changes.
* Remove semver.md files after releaseIan Jackson2026-03-301-1/+0
|
* 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.