| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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 using rustls, previously we'd check to see whether the
application had installed a CryptoProvider (as it is required to
do). If not, we'd log a warning and install a Ring provider.
But now, we want to enable other kinds of providers,
so this behavior isn't practical any more.
(See #2448 for discussion.)
Closes #2448.
|
| |
|
|
|
|
|
|
| |
Reason is that Vec::with_capacity(len) doesn't actually allocate and the
Rustls export_keying_material() does a .is_empty() check which is under
".len() == 0".
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| |
|
|
|
| |
Now that we can admit to knowing about tor-cert-x509, we can use
TlsCertAndKeys to simplify everything.
|
| | |
|
| |
|
|
| |
Closes #2316.
|
| |
|
|
|
| |
These are as yet unimplemented; there's a stub type
for the providers (nativetls) that won't actually have them.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
| |
I've added these in places that are useful for the debugging that I've
been doing.
|
| |\
| |
| |
| |
| | |
smol: Implement smol in tor-rtcompat
See merge request tpo/core/arti!2986
|
| | | |
|
| |/
|
|
| |
See #1977, #2122.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
futures-rustls provides and re-exports rustls and thus the rustls
dependency is redundant.
Additionally, this removes `aws-lc-rs` and its inherent dependencies
from `Cargo.lock` and the entire project since they've been included
because the rustls dependency did not use `default-features = false`
and rustls by default now depends on `aws-lc-rs` as its crypto engine.
|
| | |
|
| |
|
|
|
| |
We do this so that we can make sure there's a provider installed
when we run the tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The x509-signature crate is archived, and won't see any more
releases. Using it is tying us to ring 0.16 internally,
which means we depend on two ring versions.
Fortunately, rustls-webpki relaxes some of the earlier restrictions
from the vanilla webpki crate, which means that its certificate parser
now accepts C tor's oddball x509 certificates as valid.
With this change, we can delegate to rustls's built-in
signature-checking code, and we only have to override its
certificate validation. (We still override it with a pile of
comments about how we don't validate link certificates much.)
I've had to include a few certificates: two are for tests,
but one is needed as a placeholder, since we can't construct
a rustls certificate validator without a root cert,
even if we'll never use it.
Closes #1824.
Closes #1854.
|
| |
|
|
| |
(We had added this rename when rustls renamed it originally.)
|
| |
|
|
|
|
| |
This is unfortunately necessary, because after the channel handshake, we
need to give the channel reactor a `StreamOps` handle to the underlying
stream.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to get the keying material as detailed by RFC 5705.
Because native-tls doesn't have such support, there is a place holder
panic!() for now.
This means that for the forseable future, relay would only work with
rustls until we figure out a solution for native-tls.
Closes #1432
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The rustls upgrade will solve #1377 and CVE-2024-32650.
Note that we've had to patch our RustlsProvider impl a bit in order
to keep the tests passing. See comments.
Closes #1377.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The futures-rustls crate has supplanted the async-rustls crate,
and it requires/embeds rustls 0.22.
Closes #1179.
|
| |
|
|
|
| |
FTR I don't think agree with clippy on this question, but then I often
don't.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This will make it much more convenient for code that only wants one of
these traits (or a subset of them). This is a good thing to support
because it will allow us to use a ZST in places that do not need an
actual async runtime handle (typically, the runtime handle is needed
only for spawn).
|
| |
|
|
|
|
|
|
| |
Now all of the runtime types we provide all
impl<S> TlsProvider<S> where S: ...
rather than merely TlsProvider<Self::TcpStream>.
And we document and intent to perhaps require this in the future.
|
| |
|
|
|
| |
These probably aren't for things that will fail IRL, but it's nice
to have coverage on the code, just in case.
|
| |
|
|
|
| |
If we implement our own clone on CompoundRuntime, we no longer need
Clone implementations on our TlsProvider implementations.
|
| |
|
|
|
| |
Also, more comments on why these limitations are safe within the
context of Tor, but you wouldn't want to use them elsewhere.
|
|
|
This is based on @janimo's approach in !74, but diverges in a few
important ways.
1. It assumes that something like !251 will merge, so that we can
have separate implementations for native_tls and rustls compiled
at the same time.
2. It assumes that we can implement this for the futures::io traits
only with no real penalty.
3. It uses the `x509-signature` crate to work around the pickiness of
the `webpki` crate. If webpki eventually solves their
[bug 219](https://github.com/briansmith/webpki/issues/219), we
can remove a lot of that workaround.
Closes #86.
|