Skip to content

feat: Make Rustls the default TLS provider. - #2752

Merged
seanmonstar merged 22 commits into
seanmonstar:rustls-defaultfrom
calavera:rustls_default_tls
Jul 7, 2025
Merged

feat: Make Rustls the default TLS provider.#2752
seanmonstar merged 22 commits into
seanmonstar:rustls-defaultfrom
calavera:rustls_default_tls

Conversation

@calavera

@calavera calavera commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

This switches the default TLS provider to Rustls. It keeps the native-tls feature with the same configuration it had before as the default TLS provider.

I'm new to the codebase, so let me know all the things I've missed. I've done the minimal work to see what the level or effort was to change the TLS provider. Tests seem to pass.

Todo:

@seanmonstar I'll really appreciate the feedback and guidance. This was the number 1 problem people bumped into when using Reqwest on AWS Lambda functions written in Rust when I maintained the Rust Runtime for Lambda.

Fixes #2723

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.
@calavera
calavera force-pushed the rustls_default_tls branch from 07872d2 to ad5fefa Compare June 30, 2025 22:04
@calavera

calavera commented Jun 30, 2025

Copy link
Copy Markdown
Contributor Author

I'm working through those CI errors.

@seanmonstar

Copy link
Copy Markdown
Owner

Awesome, thanks for starting this! <3

The MSRV for tokio-rustls seems to be 1.71.0.

Sigh, I could look into asking if an older version can be supported, but that's unlikely. We can also setup our MSRV job to pin rustls to a version that works. reqwest tries to provide a working option, but cannot promise all dependencies won't do their own thing.

AWS-LC-RS doesn't seem to build in nightly

Hm, that might need us to update a minimal version of a dependency?

Comment thread Cargo.toml Outdated
@calavera

calavera commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

@seanmonstar

Sigh, I could look into asking if an older version can be supported, but that's unlikely. We can also setup our MSRV job to pin rustls to a version that works. reqwest tries to provide a working option, but cannot promise all dependencies won't do their own thing.

The Rustls version that seems to be compatible with 1.64.0 is https://crates.io/crates/rustls/0.23.19, it's 7 months old.
The Tokio-Rustls version that's compatible with that is https://crates.io/crates/tokio-rustls/0.26.0, which is a year old.

Should I update the dependencies in the MSRV job with the other updates?

Hm, that might need us to update a minimal version of a dependency?

I'll look into this today.

@seanmonstar

Copy link
Copy Markdown
Owner

The Rustls version that ...

I just looked at them, and actually, that seems fine. In that, in our Cargo.toml, we just depend on the minimum version we need, which perhaps can be 0.23.19. Anyone updating through a normal cargo update will automatically get the later versions, but because we allow the older ones, someone can pin in their Cargo.lock. And then in our msrv job, we add cargo update -p rustls --precise 0.23.19 and cargo update -p tokio-rustls --precise 0.26.0.

@calavera

calavera commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

I don't even think the dependency versions in Cargo.toml need to change at all:

rustls = { version = "0.23.4", optional = true, default-features = false, features = ["std", "tls12"] }
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["tls12"] }

I've just updated the precise dependencies it needs to comply with MSRV in CI. If someone is still using 1.64.0, it should still work.

calavera added 6 commits July 1, 2025 13:13
This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.
This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.
This ensures that the MSRV for all dependencies are met.
@ducaale

ducaale commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

quinn has non-optional dependency on ring which is causing the http3 test server to panic:

thread '<unnamed>' panicked at /home/ducaale/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.28/src/crypto/mod.rs:249:14:
no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point

thread 'http3_request_full' panicked at tests/support/server.rs:283:10:
called `Result::unwrap()` on an `Err` value: Any { .. }

One workaround it is to manually install the aws_lc_rs provider, but it would be nice if ring was an optional dependency in quinn

// reqwest/tests/support/server.rs

// see https://github.com/rustls/rustls/issues/1938#issuecomment-2567934864 for why result is ignored
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); // added this line

let mut tls_config = rustls::ServerConfig::builder()
    .with_no_client_auth()
    .with_single_cert(vec![cert], key)
    .unwrap();

calavera added 3 commits July 2, 2025 09:24
Update the MSRV check to use precise dependency versions.
Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.
@calavera

calavera commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

@ducaale those are "Workspace dependencies", it's not a non-optional dependency. Quinn does have features to enable both provider Ring and AWS-LC optionally. I've fixed the problem in dd9e110

See the features in https://github.com/quinn-rs/quinn/blob/845e68daa79278beddd30eafa30c6b2c750ed22d/quinn/Cargo.toml#L20

@djc

djc commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Thanks for working on this. Maybe it would be good to make the hostname-ignoring verifier a Cargo feature, with an appropriately signalling name like dangerous-rustls-ignore-hostname (while only activating when also enabled via API)?

Comment thread Cargo.toml
rustls-tls-native-roots = ["rustls-tls-native-roots-no-provider", "__rustls-ring"]
rustls-tls-manual-roots = ["rustls-tls-manual-roots-no-provider", "__rustls-aws-lc-rs"]
rustls-tls-webpki-roots = ["rustls-tls-webpki-roots-no-provider", "__rustls-aws-lc-rs"]
rustls-tls-native-roots = ["rustls-tls-native-roots-no-provider", "__rustls-aws-lc-rs"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest getting rid of the native-roots option, rustls-platform-verifier is superior to it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to figure out how rustls-platform-verifier would fit in here. I don't think that removing options that are currently present is a good solution, as it could break people that use them for whatever reason. My current goal is to make this work with the features Reqwest has at the moment, and then extend it later.

Comment thread src/async_impl/client.rs
Comment on lines +2335 to +2336
#[cfg(not(any(feature = "__rustls-ring", feature = "__rustls-aws-lc-rs")))]
panic!("No provider set");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having this? If a downstream is not setting any __* options this doesn't happen, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could happen if someone cherry picks features without knowing what they enabled. Since this check was already here, I rather keep it.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can still happen, if a user enabled a *-no-provider feature and didn't "install" a default using rustls directly, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair!

@djc

djc commented Jul 4, 2025

Copy link
Copy Markdown
Contributor

rustls-platform-verifier has been following along with rustls's own MSRV, which is 1.71 IIUC. Is that not also an issue for reqwest here?

rustls has advanced its MSRV within the 0.23.x release series, so downstream users who are sensitive to MSRV bumps can just use an older rustls (though this seems like a pretty bad idea). On the other hand, rustls-platform-verifier has made several semver-incompatible releases while going through the same MSRV bump.

@complexspaces

This comment was marked as resolved.

@complexspaces

Copy link
Copy Markdown
Contributor

After a quick check, it seems non-trivial to downgrade rustls-platform-verifier's MSRV to match reqwests and also support the latest version of crates without causing problems. There's both crate duplication issues and API incompatibilities supporting the whole range of rustls 0.23.x.

@seanmonstar

Copy link
Copy Markdown
Owner

can just use an older rustls (though this seems like a pretty bad idea)

That's the reality some people live in, and that's why I try to support Debian stable. I've found personally that it's not hard at all to keep an older MSRV within the library itself, but controling dependencies is rough. Where it's possible to pin in a CI job, I do that to ensure that I haven't forced the MSRV on users, they can make the decision themselves whether using an older version is good for them.

Regarding the integration with rustls-platform-verifier, I think you'd need to decide whether you want to support it when this change lands or not.

@calavera First of all, amazing work. Really, thank you! ❤️

To your question, I have concerns, myself. I wouldn't want to recommend by default trusting the OS verifier stack, it's not often a good part of the OS. Some OSes have marked it deprecated (such as Apple), and applications like Chrome and Edge don't use them anymore (1). They provide their own verifier, with the ability to check the OS keystore for any additionally installed certificates. That's what I would want to use for reqwest's default.

I do wonder if, in the meantime, we can just make the default an under-specified "it verifies things", that we could improve when there's something like what I just described available. We probably could make all of that a separate PR, either way.

What do you think?

@complexspaces

Copy link
Copy Markdown
Contributor

Some OSes have marked it deprecated (such as Apple)

FWIW this is not true. Nothing that is used for chain verification in Apple's Security.framework is deprecated. Apple deprecated their SecureTransport.framework APIs, which are entirely different (they provide an entire TLS stack, like rustls does). I am not aware of any OS that has deprecated this functionality either.

@ctz

ctz commented Jul 4, 2025

Copy link
Copy Markdown

To your question, I have concerns, myself. I wouldn't want to recommend by default trusting the OS verifier stack, it's not often a good part of the OS. Some OSes have marked it deprecated (such as Apple)

I'm not sure that is right, but equally I'm not an Apple expert. The thing Apple recently deprecated was "Secure Transport" (an SSL API) and the verifier API is in Security framework. I understand that Apple also have a policy that this API must be used on iOS apps.

and applications like Chrome and Edge don't use them anymore (1). They provide their own verifier, with the ability to check the OS keystore for any additionally installed certificates. That's what I would want to use for reqwest's default.

The closest we have to that is rustls-native-certs.

It's worth noting that it falls short of what you get when depending on the platform verifier (on good platforms1) or what a browser does. Equalising that at the level of a library is pretty challenging, and platforms/browsers can do this because they are long-lived applications where it is universally accepted that they are online most of the time, and can both update themselves and download fresh data.

That's a long way of saying that using rustls-native-certs means there's no reasonable way of doing revocation, tracking CA distrusts, or checking certificate transparency proofs. rustls-platform-verifier does give a route to achieving those things (depending on the platform.)

Footnotes

  1. The platforms vary, of course. Linux is an notably weak in this area.

@seanmonstar

Copy link
Copy Markdown
Owner

Fair, I conflated Apple's verifier code with SecureTransport.

@calavera

calavera commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

I do wonder if, in the meantime, we can just make the default an under-specified "it verifies things", that we could improve when there's something like what I just described available. We probably could make all of that a separate PR, either way.

What do you think?

That makes sense to me. I’d prefer to put it in a separate PR for sure. We could start by leaving the default verifier as is, and add rustls-platform-verifier as an optional feature for people that want to rely on it, disabling apis that are not currently supported in that crate.

@seanmonstar
seanmonstar changed the base branch from master to rustls-default July 7, 2025 18:43
@seanmonstar

Copy link
Copy Markdown
Owner

That sounds good to me.

As I mentioned in the implementation issue, I've gone ahead and made a branch to hold all these steps (rustls-default), so we can merge and have some incremental commits, but still keep master ready to release fixes for now. I've changed the target for this PR, and I can merge into in a little bit, if there's nothing else you wanted to touch first.

@calavera

calavera commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

I can merge into in a little bit, if there's nothing else you wanted to touch first.

I’m good. Thanks for making that branch. I’ll open a new PR against it soon.

@seanmonstar
seanmonstar merged commit 46e3606 into seanmonstar:rustls-default Jul 7, 2025
37 checks passed
@seanmonstar seanmonstar mentioned this pull request Aug 22, 2025
5 tasks
seanmonstar pushed a commit that referenced this pull request Aug 22, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Aug 22, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Sep 19, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Oct 14, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 4, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 15, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 23, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 23, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 23, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar pushed a commit that referenced this pull request Dec 23, 2025
* feat: Make Rustls the default TLS provider.

This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Fix TlsBackend default options.

* fix: Remove hyper-tls from the default-tls feature.

It's not used by Rustls.

* fix: Update precise dependencies to run MSRV.

* fix: Make explicit the dependency version for aws-lc-sys.

This allows Reqwest to build on nightly with a version of aws-lc-sys that works and still maintains MSRV.

* fix: Use aws-lc-rs as provider when both ring and aws-lc-rs are enabled.

This should be a corner case since only one feature should be enable at a time, but some checks enable all features. Favor aws-lc-rs when all features are enabled.

* fix: Fix feature config formatting.

* fix: Reverse precise dep ordering.

This ensures that the MSRV for all dependencies are met.

* fix: Pin hyper-rustls precise version.

* fix: Build `default_rustls_crypto_provider` only when rustls is enabled.

* fix: Make rustls-tls feature work without default-tls.

* fix: Remove unused dependency.

Update the MSRV check to use precise dependency versions.

* fix: Install Crypto Provider to run the HTTP3 tests.

Since both Ring and AWS-LC-RS are supported, we need to explicitly install the correct Crypto Provider before configuring the server.

* fix: Update nightly run with the precise version of aws-lc-sys.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.

* fix: Update all Windows targets to use prebuilt nasm binaries.

* fix: Set LIBCLANG_PATH for windows builds.

* fix: Install clang and nasm on Windows i686.

* fix: Run macman.exe after adding it to the path.

* fix: Add clang and nasm for Windows x86_64 GNU.
seanmonstar added a commit that referenced this pull request Dec 23, 2025
This switches the default TLS provider to Rustls. It keeps the `native-tls` feature with the same configuration it had before as the default TLS provider.

* fix: Use prebuilt NASM compiled code on Windows.

See: https://github.com/aws/aws-lc-rs/blob/f0a6350abb247b413ffbf8ae8d8e1eb3bb1d4e66/aws-lc-sys/README.md?plain=1#L37

* fix: Update the precise version of aws-lc-rs for nightly builds.
* fix: Update all Windows targets to use prebuilt nasm binaries.

ref #2897
ref #2723

Co-authored-by: David Calavera <1050+calavera@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch default TLS to rustls

8 participants