aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | 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-199-34/+59
| | | | | | | | | | | | | | | | 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
|/ / /
* | | chanmgr: Add a comment/TODO about channel expiryDavid Goulet2026-03-181-0/+16
| | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | | chanmgr: Support reconfigure of unauthenticated channelsDavid Goulet2026-03-181-5/+8
| | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | | chanmgr: Use the unauth_channels listDavid Goulet2026-03-181-7/+12
| | | | | | | | | | | | | | | | | | Put channel without relay identities in the unauth_channels list. Signed-off-by: David Goulet <[email protected]>
* | | chanmgr: Add a list of unauthenticated channelsDavid Goulet2026-03-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to handle client/bridge -> relay channels which are not authenticated meaning they don't have a RelayIds so they can't be put in the ListByRelayIds<>. Feature gate it to "relay" as a client will never have those kind of channels. Signed-off-by: David Goulet <[email protected]>
* | | Merge branch 'http-connect-outbound-rebased' into 'main'Nick Mathewson2026-03-187-75/+636
|\ \ \ | | | | | | | | | | | | | | | | Http connect outbound rebased See merge request tpo/core/arti!3789
| * | | cargo fmtNihal2026-03-181-6/+9
| | | |
| * | | tor-chanmgr: add loopback validation, startup warning and httparseNihal2026-03-185-176/+333
| | | |
| * | | tor-chanmgr: split handshake into helper functionsNihal2026-03-181-14/+47
| | | |
| * | | tor-chanmgr: fix type inference in handshakeNihal2026-03-182-6/+6
| | | |
| * | | tor-chanmgr: refactor handshake into helper functionsNihal2026-03-181-30/+53
| | | |
| * | | tor-chanmgr: add base64ct dependency and docsNihal2026-03-183-8/+18
| | | |
| * | | tor-chanmgr: implement HTTP CONNECT proxy handshake and wire transportNihal2026-03-182-20/+186
| | | |
| * | | tor-chanmgr: add ProxyProtocol::HttpConnect variant and URI parsingNihal2026-03-181-36/+205
| | | |
* | | | Merge branch 'extra-info' into 'main'Clara Engler2026-03-183-1/+138
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 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-dirclient: Add TODO wrt Default for requestsClara Engler2026-03-181-0/+2
| | | | |
| * | | | tor-netdoc: Properly export ExtraInfoDigestClara Engler2026-03-121-0/+3
| | | | |
| * | | | tor-dirclient: Add TODO for renamingClara Engler2026-03-121-0/+1
| | | | |
| * | | | tor-dirclient: No ref semantic in ExtraInfoClara Engler2026-03-121-6/+6
| | | | |
| * | | | tor-netdoc: Add ExtraInfoDigest type aliasClara Engler2026-03-121-0/+3
| | | | | | | | | | | | | | | | | | | | Accidentally left out in the previous commit.
| * | | | tor-dirclient: Small semantic fixupsClara Engler2026-03-121-5/+15
| | | | |
| * | | | tor-dirclient: Support for extra-info requestsClara Engler2026-03-111-1/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements support for extra-info requests in tor-dirclient. It is gated behind the already existing `routerdesc` feature flag, because entities building upon router descriptors most likely also need extra-info, namely directory mirrors and directory authorities. The implementation is largely based upon the existing one for router descriptors, as they are of a very similar request format, most likely due to simply being closely related anyways.
* | | | | relay: Pass now() instead of the runtime in the crypto taskDavid Goulet2026-03-171-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we get the whole task job to be aligned on one single now value to avoid potential inconsistencies between expiry and key generation. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Add crypto tasks unit testDavid Goulet2026-03-172-1/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests the key rotation code. Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Use same wallclock() time when generating keysDavid Goulet2026-03-171-8/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Make the crypto tasks use the runtime wallclockDavid Goulet2026-03-172-25/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can unit tests properly. Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Rewrite the rotation key logic in the crypto taskDavid Goulet2026-03-172-163/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is almost a full rewrite of the crypto task which was needed in order to support our relay signing certificate to be put in the keystore which will be needed for the offline key feature. Instead of having rotate_key() do all the things, we now instead do two pass: 1. Remove all expired keys and certs. 2. Generate any missing keys. This still results in using the minimum valid_until of all our keys for the task sleep time. We can know cleanup the local trait used for this gymnastic and trade it for some more KeyMgr gymnastic. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Don't log warn if key already exists when generating oneDavid Goulet2026-03-171-4/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | | | | relay: Remove leftover comment from previous code iterationDavid Goulet2026-03-171-4/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | | | | cert: Fix minor but annoying bug in cert expiry calculationNick Mathewson2026-03-171-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We documented our SystemTime-to-expiry conversion as always rounding _up_, but we did not account for fractional seconds when doing so. Therefore, if the requested expiration was set partway through the first second of an hour, the conversion would round down. This patch fixes that, and adds a regression test. I've confirmed that the test fails without this patch. Closes #2407
* | | | | cert: Deduplicate expiry-in-hours logicNick Mathewson2026-03-174-34/+70
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | These certificates use a weird expiration format: counting hours since the unix epoch. Previously we had it implemented in two different places. This patch centralizes it, since we are about to become slightly more complicated.
* | | | keymgr: Remove now-addressed XXXGabriela Moldovan2026-03-171-3/+0
| | | |
* | | | keymgr: Fix feature-gating in testsGabriela Moldovan2026-03-171-4/+3
| | | |
* | | | keymgr: Lower get() logic into get_from_store()Gabriela Moldovan2026-03-171-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the logic for retrieving a public key from its corresponding keypair into `get_from_store()`. Fixes a bug which made it impossible to retrieve a public key using the key specifier of its keypair type with any function other than `KeyMgr::get()`.
* | | | keymgr: Add more tests to reveal the get_*() bug for public keysGabriela Moldovan2026-03-171-1/+65
| | | | | | | | | | | | | | | | This will be fixed in the next commit.
* | | | keymgr: Pass the item type to entry_descriptor() (fmt)Gabriela Moldovan2026-03-171-1/+5
| | | |
* | | | keymgr: Pass the item type to entry_descriptor()Gabriela Moldovan2026-03-171-4/+4
| | | | | | | | | | | | | | | | I am about to repurpose this test helper for other item types too.