summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
* tor-cert: Bump minor version.Gabriela Moldovan2024-03-041-1/+1
| | | | | | | | | | We bumped the minor version of `tor_checkable`, which is used in the `tor-cell` public APIs (e.g. `Ed25519Cert` implements `tor_checkable::Timebound`, using `tor_checkable::TimeValidityError` as its error type). This bumps the minor version of `tor-cert` (including for its dependents).
* Bump the minor version, for crates with breaking changes.Gabriela Moldovan2024-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | APIs were broken in these pre-1.0.0 crates: ``` tor-keymgr tor-config tor-checkable tor-circmgr tor-dirmgr tor-hsclient tor-hsservice tor-hsrproxy ``` Done with: ``` cargo set-version --bump minor -p tor-keymgr cargo set-version --bump minor -p tor-config cargo set-version --bump minor -p tor-checkable cargo set-version --bump minor -p tor-circmgr cargo set-version --bump minor -p tor-dirmgr cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p tor-hsservice cargo set-version --bump minor -p tor-hsrproxy ```
* Bump patchlevel of pre-1.0.0 crates with new APIs.Gabriela Moldovan2024-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | APIs were added: ``` tor-units tor-cell tor-proto tor-netdir arti-client ``` Done with: ``` cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-cell cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p arti-client ```
* tor-proto: Note the addition of PendingClientCirc::peek_unique_id in semver.md.Gabriela Moldovan2024-02-281-1/+1
|
* tor-proto: Add function for peeking at pending circ unique ID.Gabriela Moldovan2024-02-271-0/+5
| | | | | | | | | `tor_circmgr::Error::Protocol` will soon include an optional `UniqId`. Since `Protocol` errors can be caused by pending circuits, we need to be able to peek at their `UniqId`. Part of #1297
* tor-circmgr: Add a helper for displaying optional UniqIds.Gabriela Moldovan2024-02-272-1/+18
| | | | | | | | Some of the `tor_circmgr::Error` variants will include the `UniqId` of the corresponding circuit, so we'll need to be able to display it without the `Circ ` prefix. Part of #1297
* tor_cell: never construct empty DATA messages.Nick Mathewson2024-02-132-11/+11
| | | | | | | We never actually constructed these before, but now we enforce it at the API level. Part of #1269.
* Bump minor versionsIan Jackson2024-02-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing
* Run maint/fixup-featuresIan Jackson2024-02-051-1/+1
| | | | Discard hunks in examples/
* Mark lower-level hs-service features non-experimentalNick Mathewson2024-01-231-2/+3
|
* Merge branch 'send_incoming_request_failures' into 'main'gabi-2502024-01-173-30/+58
|\ | | | | | | | | | | | | Several clean-ups around failures in incoming stream request handlers. Closes #1190, #1189, and #1188 See merge request tpo/core/arti!1892
| * proto: Use log_ratelim to report problems delivering BEGIN messges.Nick Mathewson2024-01-172-3/+8
| |
| * Give an error on duplicate call to allow_stream_requests.Nick Mathewson2024-01-172-8/+2
| | | | | | | | Closes #1190
| * proto: Close circuit _intentionally_ when Request Sink is dropped.Nick Mathewson2024-01-172-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In theory, it might be better to just un-register the IncomingStreamRequestHandler when the Receiver for the stream requests is dropped. However, there are two reasons not to do so: 1. It's tricky. We never actually poll on the corresponding Sink, so there isn't a place where the Reactor would expect to get a prompt notification of closure. We only find out that the Receiver has been dropped when an attempt to send on the Sink returns an `is_disconnected` error. 2. It's unnecessary. In the Tor protocols, once we have decided to accept incoming stream requests on a circuit, we want to continue to do so until one of the parties closes the circuit. I've documented this in several comments, in case whe want to get fancier in the future. Closes #1188.
| * proto: Send END when buffer of IncomingRequests is fullNick Mathewson2024-01-172-13/+14
| | | | | | | | Closes #1189.
* | Remove TODO for #1191Nick Mathewson2024-01-171-3/+0
|/ | | | | | The bug described here was already fixed as #1065 via !1681. Closes #1191.
* proto: Convert a TODO HSS to ticket #1191Nick Mathewson2024-01-101-1/+1
|
* Downgrade and convert TODO HSSs to #1190.Nick Mathewson2024-01-101-2/+2
| | | | | | | | | These are about making allow_incoming_streams give an error if a handler is already installed. I'm calling these non-MUST, since they don't affect the actual API here, and we already have comments telling you not to do that. We can add them later.
* Convert a TODO HSS about excessive BEGINs to #1189.Nick Mathewson2024-01-102-2/+3
|
* proto: Downgrade TODO HSS about HopNum in IncomingStreamRequestCommentNick Mathewson2024-01-102-5/+12
| | | | | | | These comments are about internal representations and future extensions. Also, add a fail-safe check to make sure that hop_num consistency is enforced.
* proto: Downgrade TODO HSS comments about hop lookupNick Mathewson2024-01-101-2/+2
|
* proto: Change some TODO HSS comments to refer to #1188Nick Mathewson2024-01-101-3/+3
|
* Followup patchlevel bumpsNick Mathewson2024-01-091-1/+1
|
* Followup minor version bumps.Nick Mathewson2024-01-091-1/+1
| | | | | | | | These crates had no changes previously, but they depend on crates that had breaking changes themselves. tor-linkspec tor-hspow
* Patchlevel version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-4/+4
| | | | | | | | | | | | | This crate doesn't have a meaningful public API, so it just gets a patchlevel bump: arti These crates had nonbreaking changes, and get a patchlevel bump: tor-rtcompat fs-mistrust tor-llcrypto tor-cert
* Breaking version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have breaking changes on their own: tor-error tor-netdoc tor-dirmgr tor-keymgr Because of the breaking change in tor-error, and the fact that basically every crate publicly depends on tor-error (by implementing ErrorKind), we need to call this a breaking change on all of the following: tor-config tor-geoip tor-rtmock tor-log-ratelim tor-rpcbase tor-bytes tor-hscrypto tor-socksproto tor-cell tor-proto tor-netdoc tor-netdir tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-testing
* clippy: consequential rustfmtIan Jackson2024-01-021-8/+2
|
* clippy nightly: For now, locally allow blocks_in_conditionsIan Jackson2024-01-021-0/+1
| | | | | | Filed https://gitlab.torproject.org/tpo/core/arti/-/issues/1176 proposing a final fix.
* clippy: Use infallible callsIan Jackson2024-01-021-4/+2
| | | | Resolves clippy complaints about needless fallible conversions.
* clippy: Replace many calls to .get(0) with .first()Ian Jackson2024-01-022-2/+2
| | | | | FTR I don't think agree with clippy on this question, but then I often don't.
* Rename {Any}RelayCell to {Any}RelayMsgOuterNick Mathewson2023-12-146-38/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is pure renaming, done automatically with rust-analyzer. Comment fixes and other cleanups will be in the subsequent commits. We're doing this renaming because we need a name for the combination of a `RelayMsg` and an `Option<StreamId>` that we use when we have a `RelayMsg` we intend to route to a given stream or circuit internally. Previously we called this a `RelayCell`, but that name was already somewhat inaccurate, and will become _very_ inaccurate with the arrival of prop340, which breaksthe 1:1 relationship between relay cells and relay messages. (If we didn't do this renaming now, we'd soon be making the relationship between `UnparsedRelayCell`and `RelayCell` many-to-many, which would be ridiculous and confusing.) The `RelayMsgOuter` name is a placeholder: We expect that we'll want to rename this type, and may also want to rename `RelayMsg`, and unify our vocabulary in other areas too. But such a renaming will have to wait for a larger discussion affecting the specifications, so that we can use the same vocabulary everywhere.
* NtorV3Extension set encoding/decoding: include n_extensionsJim Newsome2023-12-071-3/+3
| | | | | | | | | | An encoded set of extensions in the ntorv3 handshake includes a header with the number of extensions. This change adds that header. It also changes `write_many_onto` to take a slice instead of an iterator, since we need to know the number of extensions up-front. In principle we could take a clonable iterator instead and use Iterator::count, but it's probably not worth the extra complexity.
* Remove semver.md files.Nick Mathewson2023-12-041-3/+0
|
* Bump minor versions in preparation for releaseNick Mathewson2023-12-041-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This crate is new, and gets a bump to 0.1.0. tor-log-ratelim This crate had a breaking change: tor-persist tor-llcrypto had a breaking change. These crates _are_ tor-llcrypto, or (transitively) depend on it. I am assuming that they all re-expose something from it in a way that matters: tor-llcrypto tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* Bump patchlevel versions in preparation for releaseNick Mathewson2023-12-041-5/+5
| | | | | | | | | | | | | | | These crates had backward-compatible changes, and get a patchlevel bump only: fs-mistrust tor-error tor-config tor-rtcompat tor-rtmock This crate exposes no non-CLI APIs, and gets a patchlevel bump only: arti
* Merge branch 'msrv-bump-1.70' into 'main'Ian Jackson2023-11-301-1/+1
|\ | | | | | | | | Increase our MSRV to 1.70 See merge request tpo/core/arti!1773
| * In every crate, change rust-version to 1.70.Nick Mathewson2023-11-281-1/+1
| |
* | Merge branch 'semver-breaking-upgrade-of-the-daleks' into 'main'Nick Mathewson2023-11-293-15/+14
|\ \ | | | | | | | | | | | | | | | | | | Convert to the latest versions of dalek-cryptography Closes #808 See merge request tpo/core/arti!1767
| * | Remove RngCompatExt.Nick Mathewson2023-11-292-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was needed with the old version of dalek-cryptography, which wasn't compatible with up-to-date versions of the `rand` crate(s). But now that we've upgraded, we can drop this. (We could have left it around and deprecated it, but we are already making a breaking change to tor-llcrypto by upgrading dalek-cryptography.)
| * | Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-293-12/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* | debug log: Downgrade circuit lifecycle messages to traceIan Jackson2023-11-291-4/+4
| | | | | | | | | | | | This makes it possible to see the wood for the trees. This may be controversial, but I think it's an improvement.
* | Downgrade some messages to traceIan Jackson2023-11-292-2/+2
|/ | | | | These messages are very verbose and I doubt anyone will want them, usually, even when debugging.
* Fix 'target' in doc comment for create_firsthop_ntorJim Newsome2023-11-271-1/+1
|
* Test extend_ntor_v3Jim Newsome2023-11-271-10/+33
|
* Parameterize circuit-extension test by handshake typeJim Newsome2023-11-271-55/+68
|
* Add `ClientCirc::extend_ntor_v3`Jim Newsome2023-11-273-0/+79
|
* tor-proto::circuit::reactor: handle server auxiliary handshake dataJim Newsome2023-11-271-10/+81
|
* Circuit reactor: test ntor-v3 "create"Jim Newsome2023-11-271-43/+101
|
* Add NtorV3SecretKey::generate_for_test and NtorV3SecretKey::newJim Newsome2023-11-271-39/+36
|
* Add PendingClientCirc::create_firsthop_ntor_v3Jim Newsome2023-11-272-0/+44
|