summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * chanmgr: tests: Introsuce new_test_abstract_chanmgrIan Jackson2022-08-161-8/+9
| | | | | | | | This is going to change. Centralise it first.
| * channel: Centralise Channel::send_controlIan Jackson2022-08-161-14/+16
| | | | | | | | | | | | Replaces 4 open-coded call sites. I am going to add one more.
| * tor-proto: padding::Parameters: use impl_standard_builderIan Jackson2022-08-162-7/+4
| | | | | | | | | | | | | | This is more standard. It also provides the ::build() method. This isn't a config type, and build failures ought not to happen, so we use Bug for the error.
| * arti-client: TorClient constructor: add a blank lineIan Jackson2022-08-161-0/+1
| | | | | | | | | | The rustfmt-mandated different formatting of these two very similar blocks is bad enough, without them being smooshed together.
* | Merge branch 'transient_circmgr_errors' into 'main'Nick Mathewson2022-08-162-15/+75
|\ \ | |/ |/| | | | | | | | | Mark some circuit-building errors as "transient". Closes #517 See merge request tpo/core/arti!676
| * Additionally, mark the LostUsablityRace error as a "reset".Nick Mathewson2022-08-161-1/+5
| |
| * Mark some circuit-building errors as "transient".Nick Mathewson2022-08-162-15/+71
| | | | | | | | | | | | | | | | | | | | | | | | A "transient" error is one that does not indicate a true failure, but rather an _expected_ need to retry. When we hit one of these, we do not count it against the total number of permitted failures. (We do impose a higher limit on "real failures plus transient failures", though, to prevent infinite loops in the event of a programming error. Closes #517.
* | Clarify `REASON_DONE`Emptycup2022-08-161-1/+1
| |
* | Merge branch 'hardening' into 'main'Nick Mathewson2022-08-156-3/+75
|\ \ | | | | | | | | | | | | | | | | | | arti: Add support for process hardening Closes #364 See merge request tpo/core/arti!672
| * | arti: Add support for process hardeningNick Mathewson2022-08-156-3/+75
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This is a compile-time feature with an associated configuration flag, both enabled by default. When it's turned on, hardening prevents the arti process from dumping core or being attached to by low-privileged processes. (This is a defense-in-depth measure, not an absolute way to prevent attacks. For more information, see [`secmem_proc`](https://docs.rs/secmem-proc/0.1.1/secmem_proc/).) Closes #364.
* | Merge branch 'nightly_fix_rtt' into 'main'eta2022-08-151-1/+1
|\ \ | |/ |/| | | | | Fix nightly CI: allow print_stderr in rtt tests. See merge request tpo/core/arti!673
| * Fix nightly CI: allow print_stderr in rtt tests.Nick Mathewson2022-08-111-1/+1
| |
* | Add a semver note for TcpStream send conversion.Nick Mathewson2022-08-151-0/+1
| |
* | tor-rtcompat: Require that TcpStream be SendIan Jackson2022-08-152-2/+2
|/ | | | The lack of this seems to have been an oversight.
* Merge branch 'less_arti_surface' into 'main'Nick Mathewson2022-08-1110-20/+115
|\ | | | | | | | | | | | | Reduce the arti crate's API surface; improve semver documentation. Closes #522, #530, and #532 See merge request tpo/core/arti!664
| * Add a few dire warnings about main; make main_main experimental.Nick Mathewson2022-08-111-2/+31
| |
| * Document more explicitly what "voiding a semver warranty" entailsNick Mathewson2022-08-112-2/+10
| | | | | | | | Closes #522.
| * arti: `main_main` takes command-line arguments does not call exit()Nick Mathewson2022-08-112-3/+19
| |
| * arti: Move most public APIs behind `experimental-api`.Nick Mathewson2022-08-119-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining unconditionally public APIs are those related to our configuration objects, and the main_main() API. The rationale for making main_main() public is to have an actual entry point. The rationale for making the config APIs public is: 1. We really do intend for others to be able to read our configuration files using this API. 2. The structure of our configuration files is already part of our interface. Closes #530.
| * arti: Add a feature flag for dns-proxy.Nick Mathewson2022-08-112-3/+14
| | | | | | | | | | | | | | It remains on-by-default, so users shouldn't notice a difference, but it may help when we want to save a few bytes of binary size. Closes #532
* | tor-congestion: implement the RTT estimation algorithm from prop#324eta2022-08-116-0/+519
| | | | | | | | | | | | | | | | | | | | | | This commit implements the round-trip-time estimation algorithm from Tor proposal 324, validating the implementation against the test vectors found in C tor. (Note that at the time of writing, the new test vectors may not be committed to C tor yet, but they will be soon.) This also adds the necessary consensus parameters to `NetParameters`. Some of them have been renamed in order to (hopefully) make them more understandable.
* | tor-proto: Add a comment about the tor-proto layer.Nick Mathewson2022-08-101-0/+18
| | | | | | | | | | | | | | | | | | We want to clarify that the tor-proto crate should only know _how_ its objects behave, not _why they behave that way_. (In other words, we can have a "padding strategy" setting on a channel, but not a "general usage" setting.) Closes #531.
* | Clarify that tor-proto _does_ create timers.Nick Mathewson2022-08-101-4/+2
| |
* | Merge branch 'main' into 'linkspec_refactor_v3'Nick Mathewson2022-08-1034-108/+448
|\ \ | | | | | | | | | # Conflicts: # crates/tor-netdir/semver.md
| * | Decrease the lifetimes for storing descriptors.Nick Mathewson2022-08-091-6/+29
| | | | | | | | | | | | | | | | | | | | | These values were chosen experimentally, based on those from Tor, to save disk space without wasting much bandwidth. Closes #527.
| * | Merge branch 'fix-nightly-ci' into 'main'Nick Mathewson2022-08-091-1/+1
| |\ \ | | | | | | | | | | | | | | | | fix nighly ci See merge request tpo/core/arti!668
| | * | fix nighly citrinity-1686a2022-08-081-1/+1
| | |/
| * | Merge branch 'fix-android-runtime' into 'main'eta2022-08-093-12/+45
| |\ \ | | | | | | | | | | | | | | | | fix fs-misstrust on android See merge request tpo/core/arti!667
| | * | fix fs-misstrust on androidtrinity-1686a2022-08-083-12/+45
| | |/ | | | | | | | | | | | | | | | it would fail to link at runtime due to missing getgrnam_r in bionic and then it would fail again because some directory is group writeable
| * / Update shellexpand, and switch to non-forkIan Jackson2022-08-051-1/+1
| |/ | | | | | | | | | | | | | | Now we have bus>1 ownership of the crate name `shellexpand`. I have made a release, and retired `shellexpand-fork`. The new shellexpand release switches to a (quite similarly) unforked version of `dirs`.
| * Implement establish rendezvous cellYuan Lyu2022-08-053-1/+80
| |
| * Merge branch 'zeroize' into 'main'Nick Mathewson2022-08-0416-84/+228
| |\ | | | | | | | | | | | | | | | | | | Revise our handling of the zeroize trait Closes #254 See merge request tpo/core/arti!655
| | * tor-proto: Use correct SecretBuf in handshakes.Nick Mathewson2022-08-014-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | Everything that is a secret encryption key, or an input that is used to produce a secret encryption key, has to get zeroized. And that's all! Closes #254.
| | * tor-proto: Replace SecretBytes with SecretBuf.Nick Mathewson2022-08-018-63/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not yet make sure that `SecretBuf` is used where it _should_ be, but at least it ensures that most uses of `SecretBytes` will indeed act as intended, and make sure that whatever they contain is zeroized. It requires some corresponding changes to method calls for correctness and type conformance.
| | * New SecretBuf type in tor-bytesNick Mathewson2022-08-014-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | This Writer is a simple wrapper around `Vec<u8>` that makes sure that its contents are cleared whenever they are dropped _or reallocated_. The reallocation is the important part here: without that, we risk not zeroizing the first allocation of the buffer.
| | * Add TODO comments about unwanted copies.Nick Mathewson2022-08-011-0/+2
| | |
| | * tor-llcrypto: make AES key objects ZeroizeOnDrop when using opensslNick Mathewson2022-08-011-0/+3
| | | | | | | | | | | | Part of #254.
| | * Stop deriving Zeroize for RsaIdentity.Nick Mathewson2022-08-011-2/+1
| | | | | | | | | | | | These are not secret.
| | * Use the `zeroize` feature in several cratesNick Mathewson2022-08-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `zeroize` here tells these crates that they should make various structures zeroize-on-drop. (This is not yet implemented in `aes` 0.8.1, but support has been merged in the repository for `aes`, so it should go out in the next release.) No corresponding feature flag is needed to enable zeroize-on-drop for `rsa` and `*25519-dalek` private keys.
| * | Merge branch 'provide_params_too' into 'main'Nick Mathewson2022-08-045-0/+61
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add params() method to NetDirProvider Closes #528 See merge request tpo/core/arti!658
| | * | Finish implementation of params() for DirMgr.Nick Mathewson2022-08-023-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it maintains an up-to-date set of default parameters to be handed out if there is no directory. Closes #528.
| | * | Add params() method to NetDirProvider, and partial implementationNick Mathewson2022-08-022-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | This method will let users get the latest `NetParameters`, with user-configured overrides, even if there is no current directory at all. Part of #528
| * | Merge branch 'inc-rename' into 'main'Ian Jackson2022-08-024-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Rename `.inc` and other included files to end in `.rs` Closes #381 See merge request tpo/core/arti!645
| | * | Rename `.inc` and other included files to end in `.rs`eta2022-07-264-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to mitigate syntax highlighting issues and a rust-analyzer bug (https://github.com/rust-analyzer/rust-analyzer/issues/10178), rename files that are included with the `include!` macro to have a `.rs` extension. Make sure the included files are outside `src/`, in order to not confuse humans and automated editing tools that might mistake them for valid Rust modules. fixes arti#381
| * | | Merge branch 's-micros-millis' into 'main'Ian Jackson2022-08-021-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-rtcompat: s/micros/millis inside a flaky test Closes #515 See merge request tpo/core/arti!644
| | * | | tor-rtcompat: s/micros/millis inside a flaky testeta2022-07-261-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The other tests wait for 100 milliseconds; this one waits for 100 *microseconds* for some reason, which meant it was understandably flaky if run on anything less than perfect conditions (arti#515). This is probably a typo, so just change it. fixes arti#515
* | | | tor-proto: Unify the check_match code in channel and handshakeNick Mathewson2022-08-103-46/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had to become a new internal function, since at the point that the handshake needs this code, it does not yet have a Channel to use. This change made the error messages in the handshake code more informative: and now they require a regex to check. Later, we might want to defer formatting these strings, but I don't think we need to do it now.
* | | | tor-netdir: Add a static assertion about RelayIdType::COUNTNick Mathewson2022-08-103-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing this will make sure that we fix a correctness issue in netdir that will be caused if we add more IDs. (Also add RelayIdType::COUNT in tor-linkspec.)
* | | | Implement `Into<RelayIdRef>` for `&RelayId`.Nick Mathewson2022-08-101-0/+6
| | | | | | | | | | | | | | | | | | | | This will let us use `&RelayId` in all the places that take `Into<RelayIdRef>`.
* | | | Make sure all HasRelayIds constaints allow ?Sized.Nick Mathewson2022-08-102-16/+25
| | | |