summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* proto: Re-arrange some importsDavid Goulet2025-10-231-3/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Add a note about channel canonicityDavid Goulet2025-10-231-0/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Compute authenticate data after validating certificatesDavid Goulet2025-10-234-15/+58
| | | | | | | | | | | | | | This is only done if we kept the AUTH_CHALLENGE cell and we have relay identities. In other words, this is only when the UnverifiedChannel was created from a RelayInitiatorHandshake. Note: The check_internal() function is too large and should be refactored in smaller pieces. Note: It is also likely that we need to split UnverifiedChannel and VerifiedChannel as it is getting client or relay members. Not great. Signed-off-by: David Goulet <[email protected]>
* proto: Add a relay channel builderDavid Goulet2025-10-233-2/+37
| | | | | | | | | | The client and relay channel builder don't share anything and return different objects hence the seperation. Furthermore, this seperation avoids having the client ChanMgr ability to launch relay channels. Signed-off-by: David Goulet <[email protected]>
* proto: Add RelayIdentities object holding our keysDavid Goulet2025-10-233-1/+63
| | | | | | | | | | | | | | | This is a intermediary object between tor-chanmgr and tor-proto that is when building a relay channel, those keys/certs need to be set in the ChannelBuilder so the tor-proto can use them to authenticate. We avoid that way making tor-proto depending on tor-keymgr for the ultimate goal to avoid tor-proto to have access to all the keys in the KeyMgr. Future commits will introduce a relay channel builder which will use that object to set the keys. Signed-off-by: David Goulet <[email protected]>
* proto: Add the channel authentication dataDavid Goulet2025-10-234-2/+160
| | | | | | | | | | | This commit only adds a struct holding all the authentication data that needs to be built during the verification process after all handshake cells needed for authentication have been sent. It lives in the VerifiedChannel struct so it can be used to build the AUTHENTICATE cell and be sent before the NETINFO. Signed-off-by: David Goulet <[email protected]>
* proto: Add RelayInitiatorHandshakeDavid Goulet2025-10-235-1/+141
| | | | | | | This implements the relay initiator side of the handshake up to the creation of an unverified channel. Signed-off-by: David Goulet <[email protected]>
* proto: Change visibility for some channel objectsDavid Goulet2025-10-233-19/+20
| | | | | | | | | | Upcoming code for relay channels are put in the src/relay module and thus we need visibility into some channel generic things. Turns out also we don't need to re-export publicly UnverifiedChannel and VerifiedChannel. Signed-off-by: David Goulet <[email protected]>
* tor-netdoc: impl ItemArgumentParseable for IgnoredIan Jackson2025-10-232-2/+11
| | | | Change our mind about the logic for encoding an Ignored.
* tor-netdoc: Abolish ArgumentNotPresent alias, completing the renameIan Jackson2025-10-233-9/+6
|
* tor-netdoc: Use NotPresent rather than Option<Ignored> to suppress fieldsIan Jackson2025-10-234-8/+8
|
* tor-netdoc: Add unit tests for NotPresent and Ignored objectsIan Jackson2025-10-231-1/+32
|
* tor-netdoc: Add unit tests for NotPresent itemsIan Jackson2025-10-233-2/+6
|
* tor-netcoc: Introduce NotPresent, for absent multiplicityIan Jackson2025-10-233-9/+88
| | | | | | | | | Currently this is mishandled: the current use sites (in rs/each_variety.rs) use Option<Ignored>, which would reject repeated items with that keyword, which is technically wrong. And encoing will become a problem. Vec<Ignored> would be wrong too. Instead, broaden NotPresent and give it multiplicity impls.
* tor-netdoc: Move parse2 impls on Ignored to types/misc.rsIan Jackson2025-10-232-23/+22
| | | | | | This seems to be where we're putting most of the parse2 impls on these types, now. That makes more sense as parse2 becomes more of a proper thing.
* Merge branch 'add-tracing-to-update-guardset-internal' into 'main'David Goulet2025-10-221-3/+7
|\ | | | | | | | | tor-guardmgr: Add more tracing to update_guardset_internal. See merge request tpo/core/arti!3388
| * tor-guardmgr: Add more tracing to update_guardset_internal.Wesley Aptekar-Cassels2025-10-221-3/+7
| | | | | | | | This would have been useful in looking into #2224.
* | tor-netdoc: Document new feature in semver.mdIan Jackson2025-10-221-0/+1
| |
* | tor-netdoc: NetdocParseableFields derive: support flatten (test)Ian Jackson2025-10-221-0/+11
| |
* | tor-netdoc: NetdocParseableFields derive: support flattenIan Jackson2025-10-221-2/+26
| | | | | | | | | | | | | | | | | | This allows a NetdocParseableFields inside a NetdocParseableFields. The code is rather duplicative with the NetdocParseable implementation. This is due to limitations in derive-deftly; see https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/525 where I'm trying to start to address them.
* | tor-netdoc: NetdocParseableFields derive: break out kw variableIan Jackson2025-10-221-1/+3
|/ | | | We're going to reuse this.
* Merge branch 'nd-preamble' into 'main'Ian Jackson2025-10-225-71/+83
|\ | | | | | | | | tor-netdoc: Rename consensus Header to Preamble, etc. See merge request tpo/core/arti!3378
| * tor-netdoc: Preamble: Fix garbled doc commentIan Jackson2025-10-221-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3378#note_3277957
| * tor-netdoc: Preamble: rename relay_version field to server_versionIan Jackson2025-10-224-8/+9
| | | | | | | | This makes it match the protocol and the spec.
| * tor-netdoc: Say Preamble doesn't contain vote-status, in summary.Ian Jackson2025-10-221-1/+1
| |
| * tor-netdoc: Explain that Preamble doesn't contain vote-status either.Ian Jackson2025-10-221-1/+1
| |
| * tor-netdoc: Document breaking changes in semver.mdIan Jackson2025-10-221-0/+2
| |
| * tor-netdoc: netstatus: Preamble: Name the protocols fields in docIan Jackson2025-10-221-0/+2
| |
| * tor-netdoc: netstatus: Preamble: rename shared rand fields to match docIan Jackson2025-10-223-18/+18
| | | | | | | | | | We should use the same name everywhere, even if the name in the spec is clumsy (as it is here).
| * tor-netdoc: Move ConsensusFlavor into Consensus structIan Jackson2025-10-223-14/+22
| | | | | | | | | | | | We're going to want to apply the parse2 derive to Preamble, but this field is anomalous. Rather than trying to make it regular, simply move it to the old-parser-specific Consensus struct.
| * tor-netdoc: Declare intent not to apply parse2 to ConsensusIan Jackson2025-10-221-4/+1
| | | | | | | | | | | | | | Consensus is not going to be easy to square with parse2 - especially, signature handling is very different between the two parsers. Instead, we'll have a new NetworkStatus type.
| * tor-netdoc: Rename consensus Header to PreambleIan Jackson2025-10-224-40/+42
| | | | | | | | | | There is no such thing as the "header" according to the spec. We mean the preamble.
* | Merge branch 'ctrl-msg-2' into 'main'David Goulet2025-10-222-111/+113
|\ \ | |/ |/| | | | | proto: Move the control channels to RelayReactor See merge request tpo/core/arti!3387
| * proto: Replace select! with select_biased!Gabriela Moldovan2025-10-221-2/+2
| | | | | | | | We need to give the control channels higher priority here.
| * proto: Update an outdated doc linkGabriela Moldovan2025-10-221-1/+1
| |
| * proto: Add debug log when RelayReactor shuts downGabriela Moldovan2025-10-221-2/+14
| |
| * proto: Replace futures::select with importGabriela Moldovan2025-10-221-2/+2
| |
| * proto: Remove no-longer relevant note on control message handlingGabriela Moldovan2025-10-221-10/+0
| |
| * proto: Remove an already-addressed TODOGabriela Moldovan2025-10-221-2/+0
| |
| * proto: Handle control messages in RelayReactorGabriela Moldovan2025-10-222-51/+53
| | | | | | | | Control messages are handled in RelayReactor instead of BackwardReactor.
| * proto: Move the control channels to RelayReactorGabriela Moldovan2025-10-222-53/+53
| | | | | | | | | | This only moves the control/command fields to RelayReactor. The next step is to actually implement the control message handling and dispatch.
* | Merge branch 'tor-dirserver-msrv-1.86' into 'main'David Goulet2025-10-221-1/+1
|\ \ | |/ |/| | | | | tor-dirserver: Bump MSRV from 1.83 to 1.86 See merge request tpo/core/arti!3385
| * tor-dirserver: bump MSRV from 1.83 to 1.86hashcatHitman2025-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that when doing `cargo generate-lockfile` in the workspace root, it was locking dependencies to 1.83 compatible versions. It turns out tor-dirserver started on MSRV 1.83 after we already bumped to 1.85, and has been missed in MSRV updates ever since. I've found no indication it is intentionally getting this special treatment and am assuming it is a mistake. Signed-off-by: hashcatHitman <[email protected]>
* | Merge branch 'p2-shared-rand-status' into 'main'Ian Jackson2025-10-225-17/+28
|\ \ | | | | | | | | | | | | impl ItemValueParseable for SharedRandStatus See merge request tpo/core/arti!3380
| * | tor-netdoc: impl ItemValueParseable for SharedRandStatusIan Jackson2025-10-211-0/+1
| | |
| * | tor-netdoc: impl Display, FromStr, NormalItemArgument for SharedRandValIan Jackson2025-10-211-2/+18
| | |
| * | tor-netdoc: derive From<Vec<u8>> and v-v for B64Ian Jackson2025-10-211-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | This may not be the best utility type to use for lots of the fixed-length byte strings, but we *are* using it a lot in the old and now the new parser. Implement From and Into.
| * | tor-netdoc: Change type of timestamp in SharedRandStatus (fmt)Ian Jackson2025-10-211-2/+1
| | |
| * | tor-netdoc: Change type of timestamp in SharedRandStatusIan Jackson2025-10-214-7/+8
| | |
* | | Merge branch 'restricted-discovery-stable' into 'main'gabi-2502025-10-224-14/+13
|\ \ \ | | | | | | | | | | | | | | | | arti: Mark restricted-discovery as non-experimental See merge request tpo/core/arti!3384