summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
* Implement a higher-level API for the ntor v3 handshakeeta2022-07-081-23/+162
| | | | | | | | | | | | | | | | | | | This implements a higher-level API for the ntor v3 handshake, in line with that exposed by the ntor handshake. It does not, however, use the existing `ClientHandshake` trait, due to fundamental differences in the handshakes (namely, that the v3 handshake can include some additional extra extension data). Currently, the higher-level API assumes circuit extension, and copies the (undocumented!) magic verification string from c-tor that indicates this usage. A rudimentary set of functions for serializing and deserializing extensions to be sent with the handshake is also included, implementing the protocol in proposal 332 § A.2. Currently, it only implements the congestion control extensions specified in proposal 324 § 10.3. part of arti#88
* Update `rsa` dependency (and use `x25519-dalek` prerelease)eta2022-07-061-6/+5
| | | | | | | | | | | | | | - arti#448 and arti!607 highlight an issue with upgrading `rsa`: namely, the `x25519-dalek` version previously used has a hard dependency on `zeroize` 1.3, which creates a dependency conflict. - However, `x25519-dalek` version `2.0.0-pre.1` relaxes this dependency. Reviewing the changelogs, it doesn't look like that version is substantially different from the current one at all, so it should be safe to use despite the "prerelease" tag. - The new `x25519-dalek` version also bumps `rand_core`, which means we don't have to use the RNG compat wrapper in `tor-llcrypto` as much. closes arti#448
* Remove semver.md files now that 0.5.0 is outNick Mathewson2022-06-241-3/+0
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --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 patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* Merge branch 'clippy' into 'main'Ian Jackson2022-06-242-3/+12
|\ | | | | | | | | Fix clippy nightly again See merge request tpo/core/arti!603
| * clippy: Consolidate many lints in maint/add_warningIan Jackson2022-06-241-3/+9
| | | | | | | | | | | | Found these by disabling the nightly dbg macro special case. Now, we have a mechanism for globally adding suppressions to tests, we can use that instead.
| * Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | | | | | Update all lint blocks
* | tor-proto: split and elaborate tor_bytes::Error instancesNick Mathewson2022-06-236-21/+70
| | | | | | | | | | | | | | | | | | Some of these were for decoding particular objects (we now say what kind of objects), and some were unrelated tor_cert errors that for some reason we had shoved into a tor_bytes::Error. There is now a separate tor_cert::CertError type, independent from tor_cert's use of `tor_bytes::Error` for parsing errors.
* | tor-proto: Split CellErr based on activity.Nick Mathewson2022-06-236-18/+54
| | | | | | | | | | | | Failing to encode is fundamentally different from failing to decode. We now treat those separately, and describe _what_ we failed to encode or decode.
* | tor-proto: clean up error names and messagesNick Mathewson2022-06-2312-85/+90
|/ | | | | This avoids adding additional information for now; that will come on the next commits.
* Merge branch 'display_source_cleanup' into 'main'eta2022-06-212-9/+10
|\ | | | | | | | | Do not include error source() in display() format. See merge request tpo/core/arti!598
| * Do not include error source() in display() format.Nick Mathewson2022-06-212-9/+10
| | | | | | | | | | | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* | channel padding: Rename ChannelsParams from ChannelsConfig (rustfmt)Ian Jackson2022-06-212-2/+2
| | | | | | | | Consequential ordering changes.
* | channel padding: Rename ChannelsParams from ChannelsConfigIan Jackson2022-06-214-59/+59
| | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276 Change names and comments and docs everywhere.
* | tor-proto: Have Channel::reconfigure throw ChannelClosedIan Jackson2022-06-211-2/+2
| | | | | | | | | | Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813567
* | tor-proto: err: Provide ChannelClosed as a separate unit errorIan Jackson2022-06-215-18/+38
| |
* | channel padding: Use IntegerMilliseconds in padding::ParametersIan Jackson2022-06-212-10/+12
| |
* | Fix docs for `CtrlMsg::ConfigUpdate`Ian Jackson2022-06-211-5/+2
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813565
* | Fix typoseta2022-06-211-1/+1
| |
* | channel padding: Plumb settings from chanmgrIan Jackson2022-06-212-12/+4
| |
* | channel padding: Introduce ChannelsConfig and reconfigure facilityIan Jackson2022-06-214-3/+242
| | | | | | | | Nothing geenrates config updates yet.
* | channel padding timer: Support reconfigurationIan Jackson2022-06-211-4/+15
| | | | | | | | Nothing calls this yet.
* | channel padding timer: Allow creation without providing parameters yetIan Jackson2022-06-212-16/+32
| | | | | | | | It turns out that we are going to want this.
* | channel padding: Test creation in disabled stateIan Jackson2022-06-211-0/+12
| | | | | | | | | | We're about to split the main new() function off so write a separate test for new_disabled().
* | channel padding: Make Parameters a pub struct with builderIan Jackson2022-06-213-3/+15
|/ | | | chanmgr is going to want to make one of these from a NetDir.
* Merge branch 'config-fix2' into 'main'Nick Mathewson2022-06-161-0/+1
|\ | | | | | | | | Use impl_standard_builder more and remove manual Default/builder impls See merge request tpo/core/arti!594
| * tor-proto: channel: Tell clippy it's ok to print in testsIan Jackson2022-06-161-0/+1
| |
* | Merge branch 'high-level-features' into 'main'Nick Mathewson2022-06-161-0/+2
|\ \ | | | | | | | | | | | | | | | | | | Add "full" and "experimental" features to arti, arti-client, and below. Closes #499 See merge request tpo/core/arti!584
| * | Add "full" and "experimental" features to arti-client and below.Nick Mathewson2022-06-101-0/+2
| |/ | | | | | | | | | | | | | | | | The "full" feature is a catch-all for all features, _except_: * Those that select a particular implementation (like tor-llcrypto/with-openssl) or build flag (like "static") * Those that are experimental or unstable (like "experimental-api") * Those that are testing-only.
* / Permit eprintln in channel-padding test.Nick Mathewson2022-06-151-0/+1
|/ | | | | There is not, apparently, an eprintln equivalent for allow-dbg-in-tests.
* Merge branch 'channel' into 'main'Nick Mathewson2022-06-104-10/+605
|\ | | | | | | | | Have channel reactor able to send channel padding See merge request tpo/core/arti!574
| * channel padding timer: Explain why next() in select_biased!Ian Jackson2022-06-091-0/+7
| |
| * channel padding timer: document state invariantsIan Jackson2022-06-091-2/+24
| | | | | | | | There aren't very many.
| * Fix more typos in comments, from a spellcheckerIan Jackson2022-06-091-6/+6
| |
| * Fix typo in commentNick Mathewson2022-06-091-1/+1
| |
| * Fix erroneous commentNick Mathewson2022-06-091-1/+1
| |
| * Fix typos in commentsNick Mathewson2022-06-091-3/+3
| |
| * tor-proto: padding: Test padding timer distributionIan Jackson2022-06-082-0/+125
| |
| * tor-proto: channel: Use padding::TimerIan Jackson2022-06-083-12/+44
| |
| * tor-proto: channel: Provide padding::TimerIan Jackson2022-06-083-0/+409
| |
* | Change to exhaustive match.Ian Jackson2022-06-081-1/+2
| |
* | update semver.mdtrinity-1686a2022-06-081-0/+1
| |
* | try to differentiate transient from nontransient errortrinity-1686a2022-06-083-10/+23
|/
* Merge branch 'sleep' into 'main'Ian Jackson2022-06-086-57/+119
|\ | | | | | | | | Plumb a SleepProvider (now Clone + ....) into Channel See merge request tpo/core/arti!569
| * Document semver changesIan Jackson2022-06-081-0/+1
| |
| * Plumb a SleepProvider into the channel reactorIan Jackson2022-06-085-57/+118
| | | | | | | | | | The channel reactor is going to want to be able to sleep so that it can do padding, so it needs a SleepProvider.
* | Merge branch 'use-testing-rng'Nick Mathewson2022-06-078-13/+20
|\ \ | |/ |/|
| * Use testing_rng() in tests throughout our crates.Nick Mathewson2022-06-028-13/+20
| | | | | | | | | | | | This only affects uses of thread_rng(), and affects them all more or less indiscriminately. One test does not work with ARTI_TEST_PRNG=deterministic; the next commit will fix it.
* | Merge branch 'lint' into 'main'Ian Jackson2022-05-311-0/+2
|\ \ | |/ |/| | | | | | | | | lints: Make lint blocks consistent and ensure they stay that way Closes #469 See merge request tpo/core/arti!557
| * lints: Add lint block delimiters to every crateIan Jackson2022-05-311-0/+2
| | | | | | | | | | | | This was the result of: maint/add_warning crates/*/src/{lib,main}.rs and then manually curating the results.