| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
| |
Removed unnecessary lint
|
| |
|
|
|
|
|
| |
We _already_ do not include FLOWCTRL_CC as a listed protocol among
the capabilities we provide, when we make a virtual hop. This
branch will make that behavior even more certain, by not looking at
required-client-protocols any longer.
|
| |
|
|
| |
This commit wraps the port policies in an Intern.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
| |
C Tor calls this a "period", but "interval" is more accurate.
|
| | |
|
| |
|
|
|
| |
There's no reason that the next person should have to rediscover
these caveats.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Duration::try_from_secs_f64 has existed since Rust 1.66,
so we can use it now.
It seems wrong to treat "infinity" and "negative infinity" as "one
second", so make them actually saturating.
Additionally, document behavior for infinity and negative infinity,
and document that the NaN behavior isn't documented.
(And secretly NaN behavior return a number on the same order of
magnitude as the input.)
|
| |
|
|
|
| |
This strategy is safe because (outside of our tests) we never look
at the actual values of timeout_scale, but only at their ratios.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Part of #2428.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Force use of standard hasher with weak_tables.
Closes #2418
See merge request tpo/core/arti!3801
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #2418.
Fixes TROVE-2026-005, where we would use a less cryptographically
secure (and probably less DoS resistant) hash function for these
tables if:
- We are built alongside another crate that uses `weak-table`
- That crate enables the `weak-table/ahash` feature.
- We are running on a system without hardware AES.
Severity: Low
|
| |/
|
|
| |
Typos found with codespell
|
| | |
|
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires the `TlsKeyAndCert` so be passed on the TLS acceptor
settings. We assume that `RelayIdentities` has this information.
The ChanBuilder::new() was getting a bit too convoluted and feature
gated to instead we introduce new_client() and new_relay() and remove
the need for `with_identities()`.
Because of this, the ChanMgr::new() now returns a `Result<>`.
Related to #1597
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This struct is used to pass configuration parameters to the ChanMgr when
building it.
At the moment, it holds the ChannelConfig and RelayIdentities (feature
gated) which will be used in subsequent commits.
Note that relays do require RelayIdentities to build channels.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
We'll rely on a RelayIdentities to pass in the right keys to the ChanMgr
instead of the entire KeyMgr.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
rend_handshake time
|
| | |
|
| | |
|
| |
|
|
|
| |
(We could tighten this up even more by inlining some of the default
values.)
|
| |
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| | |
|
| |
|
|
|
| |
Since "info" is the default level, we don't want to log by default each
time a circuit reactor is created.
|
| | |
|
| |
|
|
| |
This silences a new nightly warning.
|
| |
|
|
|
|
|
| |
Now that `vanguard_config()` is no longer conditional, we can handle
`vanguard_config` just like other accessors. This is a breaking change,
but I think we may as well make this change while we've already made
another breaking change in the previous commit.
|
| | |
|
| |
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rust was treating this as a wildcard match if the `hs-common` feature
wasn't enabled. This shouldn't have caused any bugs since the other
match arms were already exhaustive, but this could have lead to a bug if
new enum variants were added to `SupportedTunnelUsage`.
```text
warning: variable `HsOnly` should have a snake case name
--> crates/tor-circmgr/src/usage.rs:600:13
|
600 | HsOnly => {
| ^^^^^^ help: convert the identifier to snake case: `hs_only`
|
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
warning: `tor-circmgr` (lib) generated 1 warning
```
|
| |
|
|
|
|
|
| |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're going to separate RelayFlag from RelayFlags.
We could continue to provide a bunch of constant values for
RelayFlags, for each individual type, but that would involve an ad-hoc
derive, and would still be a bit of an unusual API.
Instead, we're going to make ``RelayFlag` a normal enum.
In this commit, we change everyone to refer to it by its singular
name. Hopefully separating out this bulk change makes both this, and
the core commit, easier to review.
|
| |
|
|
| |
I would do `#[deprecated]` but empirically that has no effect...
|