summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Run fixup-features script and resolve its complaints.Nick Mathewson2023-05-311-1/+1
|
* Merge branch 'stream_ctrl' into 'main'Nick Mathewson2023-05-244-3/+238
|\ | | | | | | | | | | | | Experimental new stream-ctrl feature Closes #847 See merge request tpo/core/arti!1198
| * Add "TODO RPC" notes around DataStreamCtrl per review.Nick Mathewson2023-05-242-0/+16
| |
| * proto: Add stream-status functionality to DataStreamCtrl.Nick Mathewson2023-05-241-2/+106
| | | | | | | | There are some weaknesses and problems here; see TODO notes.
| * proto: Create a `DataStreamCtrl` type.Nick Mathewson2023-05-223-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that we want to make DataStream visible to the RPC system without requiring that the RPC session hold the DataStream itself (or the Reader, or the Writer). We could solve this problem by making _all_ the state in the DataStream shared, but that would introduce unnecessary extra locking in our critical path. Instead we're creating the notion of a "control handle" that lets you manage and observe a stream without actually owning the stream. Right now the only supported functionality is asking for the stream's circuit. Part of #847
| * proto: Add a new experimental stream-ctrl feature.Nick Mathewson2023-05-221-1/+2
| | | | | | | | | | (It doesn't do anything yet. It may eventually become always-on. But for now let's make this API optional. Part of #847)
| * tor-proto: Move a comment in Cargo.tomlNick Mathewson2023-05-221-1/+2
| |
* | proto: Make PathEntry::Virtual feature-conditional.Nick Mathewson2023-05-232-0/+3
|/ | | | | This fixes a warning when building tor-proto without the `rpc-common` feature.
* Merge branch 'virtual_hop' into 'main'Nick Mathewson2023-05-185-38/+245
|\ | | | | | | | | | | | | tor-proto: Add support for extending circuits through virtual hops. Closes #726 See merge request tpo/core/arti!1191
| * proto: Explain "virtual" hops better.Nick Mathewson2023-05-181-0/+4
| | | | | | | | Based on text from @diziet
| * proto: Try to improve the documentation in crypto/cell.rsNick Mathewson2023-05-181-24/+86
| |
| * proto: Allow circuit Paths to represent virtual hops.Nick Mathewson2023-05-183-14/+57
| | | | | | | | | | Sadly, this adds a few more `TODO HS` entries, but I think we can clean them up later after a bit of discussion.
| * proto: Implement Circuit::extend_virtual.Nick Mathewson2023-05-182-2/+59
| | | | | | | | | | | | | | There are a few new TODO hs comments, though, and an XXXX I'll need to fix up in the next commit. Implements #726.
| * tor-proto: Code to construct crypto layers for virtual hops.Nick Mathewson2023-05-183-1/+42
| | | | | | | | | | This is fairly straightforward, thanks to our existing design work on this code.
* | tor-guardmgr, tor-proto: minor logging tweakseta2023-05-181-2/+2
| | | | | | | | | | | | | | | | - We make the tor-guardmgr "We have found that {} is usable" line include the word "guard", otherwise it doesn't appear very useful to a user in safe logging mode, since the guard gets replaced with [scrubbed]. - The "Actually got an end cell..." message is downgraded to DEBUG.
* | hs_ntor: several documentation cleanups.Nick Mathewson2023-05-171-6/+14
| |
* | hs_ntor: make encrypt_and_mac take a typed public keyNick Mathewson2023-05-171-10/+6
| | | | | | | | This is still not the most beautiful interface, but it'll do for now.
* | hs_ntor: remove the last lingering AsRef<[u8]>Nick Mathewson2023-05-171-7/+7
| |
* | hs_ntor: Add a test vector case extracted from C tor.Nick Mathewson2023-05-171-0/+104
| |
* | hs_ntor: Calculate MAC on introduce1 message correctly.Nick Mathewson2023-05-171-3/+12
| | | | | | | | | | | | There were two bugs here that made the behavior unlike that of C tor: we had swapped the MAC inputs, and we had forgotten to include the public key X in the input.
* | hs_ntor: Make internal no-rng variants of the handshake functions.Nick Mathewson2023-05-171-2/+25
| | | | | | | | We'll want these so we can implement some test vectors.
* | hs_ntor: Move extra data outside of the "input" fields.Nick Mathewson2023-05-171-59/+33
| | | | | | | | | | | | | | I think that these Input structs had been defined so that we could use hs_ntor interchangeably with other handshakes. The trouble is, though, that it doesn't really work like any other handshakes we have.
* | hs_ntor: Use MAC implementation from tor-hscryptoNick Mathewson2023-05-171-35/+16
| | | | | | | | | | | | Note that some of the invocations for this function seem to put the key and the message in a questionable order. But that's a thing to figure out later, while debugging.
* | hs_ntor: Use correct PK types from tor_hscrypto.Nick Mathewson2023-05-171-20/+24
| |
* | hs_ntor: Use Subcredential type from tor-hscryptoNick Mathewson2023-05-172-5/+5
|/
* Merge branch 'arc_circ' into 'main'gabi-2502023-05-173-18/+24
|\ | | | | | | | | | | | | Refactor ClientCirc APIs to use Arc<ClientCirc>. Closes #846 See merge request tpo/core/arti!1187
| * Refactor ClientCirc APIs to use Arc<ClientCirc>.Nick Mathewson2023-05-163-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | Now ClientCirc is no longer `Clone`, and the things that need it to be `Clone` instead return and use an Arc<ClientCirc> We're doing this so that ClientCirc can participate in the RPC system, and so that its semantics are more obvious. Closes #846. Thanks to the type system, this was a much simpler refactoring than I had feared it would be.
* | Merge branch 'ticket_759' into 'main'Nick Mathewson2023-05-161-2/+2
|\ \ | |/ |/| | | | | | | | | tor-cert: Replace the KeyUnknownCert::check_key API Closes #759 See merge request tpo/core/arti!1184
| * Replace usage of KeyUnknownCert::check_key.Nick Mathewson2023-05-161-2/+2
| |
* | Revise all XXXXs from fixup-featuresNick Mathewson2023-05-151-5/+3
| |
* | Run fixup-features _with_ annotations.Nick Mathewson2023-05-151-0/+2
| | | | | | | | | | This litters our Cargo.toml files with "XXX" entries that we should fix.
* | Reformat Cargo.toml files.Nick Mathewson2023-05-151-1/+18
| |
* | Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-5/+6
|/ | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* Use non-deprecated *Secret::random_from_rng.Nick Mathewson2023-05-133-13/+13
| | | | The `new` function is deprecated in x25519-dalek 2.0.0-rc.2
* Change CircTarget::linkspecs() to return an encoded list.Nick Mathewson2023-05-102-7/+9
| | | | | | | | If we didn't do this, we would need to transfrom `EncodedLinkSpec`s into a `LinkSpec::Unrecognized`, which is not semantically right. What's more, every user of this API wants to consume encoded link specifiers, so encoding them early saves a little effort.
* Upgrade tracing to 0.1.36.Nick Mathewson2023-05-031-1/+1
| | | | | | This is the first version to impl Value for String. With luck, this will get minimal_versions CI passing.
* Increment crate versions.Nick Mathewson2023-05-031-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* async-utils: rename SinkExt to SinkPrepareExtNick Mathewson2023-04-191-1/+1
|
* Upgrade our hex-literal dependencyNick Mathewson2023-04-131-1/+1
|
* tor-proto: Be explicit about an into().Nick Mathewson2023-04-121-1/+1
| | | | | | | This is a workaround for an issue that I'm about to encounter somewhere in our pile of dependencies as I add arti-rpcserver, and somehow make serde_json visible in this test code thereby, making the PartialEq method resolution ambiguous.
* Increment MSRV to 1.65 in every crate.Nick Mathewson2023-04-111-1/+1
|
* Remove semver.md files.Nick Mathewson2023-03-311-1/+0
|
* Patchlevel bumps for crates whose dependencies just changed.Nick Mathewson2023-03-311-2/+2
| | | | | | | | | | | | | | | | These crates had no changes until just a moment ago. But since we updated the versions on some of their dependents, they have now changed themselves. Thus they get patchlevel bumps. ``` tor-rtmock tor-protover tor-socksproto tor-consdiff tor-chanmgr tor-dirclient tor-hsservice ```
* Bump crate versions that have breaking changesNick Mathewson2023-03-311-2/+2
| | | | | | | | | | These crates have had breaking changes. They are pre-1.0, so they get a minor bump. ``` tor-basic-utils tor-config ```
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* Move functionality from tor_basic_utils to tor_async_utilsNick Mathewson2023-03-292-6/+4
| | | | | This commit is mostly code movement; I'd recommend reviewing it with git's `--color-moved` option.
* Add some missing importsIan Jackson2023-03-281-1/+4
| | | | | | | | Now nailing-cargo +stable clippy -p tor-hsclient --all-features --all-targets actually works. squash! Add some missing imports
* Add an experimental circuit accessor to DataStream.Nick Mathewson2023-03-232-2/+34
| | | | Closes #784.
* tor-proto: Feature-conditionalise some enum variantsIan Jackson2023-03-231-0/+6
| | | | This avoids some dead code warnings when building without send-control-msg.