aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat/src/impls/rustls.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | 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.
* rtcompat: document choice of aws_lc_rs providerNick Mathewson2026-04-081-9/+11
|
* rtcompat: Stop installing backup CryptoProvider.Nick Mathewson2026-04-021-5/+8
| | | | | | | | | | | | 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.
* rtcompat: Allocate the zeroed vector for export_keying_material()David Goulet2026-02-261-1/+1
| | | | | | | | 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]>
* tor-rtcompat: disable rustls session resumptionSteven Engler2026-02-241-1/+7
|
* rtcompat: Return certificates as Cow.Nick Mathewson2026-02-021-5/+5
|
* rtcompat: Improved tls-server key/cert handling.Nick Mathewson2026-02-021-2/+3
| | | | | Now that we can admit to knowing about tor-cert-x509, we can use TlsCertAndKeys to simplify everything.
* rustls: add an error for unimplemented tls server support.Nick Mathewson2026-01-291-1/+1
|
* rtcompat: Implement TLS server support for rustls.Nick Mathewson2026-01-291-8/+19
| | | | Closes #2316.
* rtcompat: new server-related members on TlsProvider trait.Nick Mathewson2026-01-291-0/+9
| | | | | These are as yet unimplemented; there's a stub type for the providers (nativetls) that won't actually have them.
* rtcompat: new own_certificate method on CertifiedConn traitNick Mathewson2026-01-291-0/+5
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-0/+2
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* Merge branch 'smol-add-impl-in-tor-rtcompat' into 'main'opara2025-08-211-1/+4
|\ | | | | | | | | smol: Implement smol in tor-rtcompat See merge request tpo/core/arti!2986
| * smol: Implement smol in tor-rtcompatNiel Duysters2025-08-211-1/+4
| |
* | Document why we are using ring with rustlsNick Mathewson2025-08-191-3/+21
|/ | | | See #1977, #2122.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | 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.
* Fix errors from rustdoc nightly.Nick Mathewson2025-08-051-1/+1
|
* tor-rtcompat: Remove rustls dependency in favor of futures-rustlsparazyd2025-06-061-1/+1
| | | | | | | | | | 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.
* rtcompat: remove Letsencrypt/Rustls kludgeretort-dev2025-05-201-48/+13
|
* rustls: move provider-installer to its own function.Nick Mathewson2025-03-041-13/+21
| | | | | We do this so that we can make sure there's a provider installed when we run the tests.
* rustls.rs: Replace x509-signature with rustls-webpkiNick Mathewson2025-03-041-101/+71
| | | | | | | | | | | | | | | | | | | | | | | 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.
* rtcompat: Un-rename CertificateDer type.Nick Mathewson2025-03-041-6/+8
| | | | (We had added this rename when rustls renamed it originally.)
* tor-rtcompat: Big invasive change adding StreamOps bound everywhere.Gabriela Moldovan2025-01-151-2/+2
| | | | | | This is unfortunately necessary, because after the channel handshake, we need to give the channel reactor a `StreamOps` handle to the underlying stream.
* tor-rtcompat: Implement StreamOps for TLS stream types.Gabriela Moldovan2025-01-151-0/+11
|
* tls: Support export keying material (RFC 5705)David Goulet2024-06-181-0/+16
| | | | | | | | | | | | | 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]>
* Add a note about CryptoProvicder.Nick Mathewson2024-04-221-0/+4
|
* Upgrade to futures-rustls 0.26.0, rustls 0.23.5.Nick Mathewson2024-04-221-0/+14
| | | | | | | | | 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.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* rtcompat: Fix a rustdoc link.Nick Mathewson2024-01-301-1/+1
|
* Upgrade to futures-rustls and rustls 0.22.Nick Mathewson2024-01-251-25/+32
| | | | | | | The futures-rustls crate has supplanted the async-rustls crate, and it requires/embeds rustls 0.22. Closes #1179.
* clippy: Replace many calls to .get(0) with .first()Ian Jackson2024-01-021-1/+1
| | | | | FTR I don't think agree with clippy on this question, but then I often don't.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* update rustls to 0.21trinity-1686a2023-05-081-16/+11
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* fix deprecation warnings from rustlstrinity-1686a2022-11-261-9/+7
|
* upgrade rustls to 0.20, ignoring all deprecation warningstrinity-1686a2022-11-261-36/+30
|
* fix doc-feature synchrotrinity-1686a2022-10-161-1/+4
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-081-0/+1
| | | | | | | | 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).
* tor-rtcompat: Provide TLS wrapping for all streamsIan Jackson2022-02-241-7/+4
| | | | | | | | 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.
* tor-rtcompat: Add some miscellaneous testsNick Mathewson2022-01-271-0/+1
| | | | | These probably aren't for things that will fail IRL, but it's nice to have coverage on the code, just in case.
* Limit the inner types in tor-rtcompat that have to implement CloneNick Mathewson2022-01-261-22/+0
| | | | | If we implement our own clone on CompoundRuntime, we no longer need Clone implementations on our TlsProvider implementations.
* More comments on the limitations of tor-rtcompat's TLS APINick Mathewson2022-01-251-0/+3
| | | | | Also, more comments on why these limitations are safe within the context of Tor, but you wouldn't want to use them elsewhere.
* tor-rtcompat: Add support for rustls.Nick Mathewson2022-01-251-0/+290
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.