Skip to content

Commit e8b5a77

Browse files
committed
Revert "feat(download/rustls): use rustls-platform-verifier"
This reverts commit fb662c5.
1 parent f1cc01e commit e8b5a77

File tree

3 files changed

+54
-108
lines changed

3 files changed

+54
-108
lines changed

Cargo.lock

Lines changed: 51 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

download/Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ default = ["reqwest-backend", "reqwest-rustls-tls", "reqwest-native-tls"]
99
curl-backend = ["curl"]
1010
reqwest-backend = ["reqwest", "env_proxy"]
1111
reqwest-native-tls = ["reqwest/native-tls", "dep:once_cell"]
12-
reqwest-rustls-tls = [
13-
"reqwest/rustls-tls-manual-roots-no-provider",
14-
"dep:rustls",
15-
"dep:rustls-platform-verifier",
16-
"dep:once_cell",
17-
]
12+
reqwest-rustls-tls = ["reqwest/rustls-tls-native-roots", "dep:rustls", "dep:once_cell"]
1813

1914
[dependencies]
2015
anyhow.workspace = true
@@ -24,7 +19,6 @@ env_proxy = { version = "0.4.1", optional = true }
2419
once_cell = { workspace = true, optional = true }
2520
reqwest = { version = "0.12", default-features = false, features = ["blocking", "gzip", "socks", "stream"], optional = true }
2621
rustls = { version = "0.23", optional = true, default-features = false, features = ["logging", "aws_lc_rs", "tls12"] }
27-
rustls-platform-verifier = { version = "0.3", optional = true }
2822
thiserror.workspace = true
2923
tokio = { workspace = true, default-features = false, features = ["sync"] }
3024
tokio-stream.workspace = true

download/src/lib.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ pub mod reqwest_be {
294294
compile_error!("Must select a reqwest TLS backend");
295295

296296
use std::io;
297-
#[cfg(feature = "reqwest-rustls-tls")]
298-
use std::sync::Arc;
299297
use std::time::Duration;
300298

301299
use anyhow::{anyhow, Context, Result};
@@ -356,13 +354,9 @@ pub mod reqwest_be {
356354
#[cfg(feature = "reqwest-rustls-tls")]
357355
static CLIENT_RUSTLS_TLS: Lazy<Client> = Lazy::new(|| {
358356
let catcher = || {
357+
let _ = aws_lc_rs::default_provider().install_default();
359358
client_generic()
360-
.use_preconfigured_tls(
361-
rustls_platform_verifier::tls_config_with_provider(Arc::new(
362-
aws_lc_rs::default_provider(),
363-
))
364-
.expect("failed to initialize pre-configured rustls backend"),
365-
)
359+
.use_rustls_tls()
366360
.user_agent(super::REQWEST_RUSTLS_TLS_USER_AGENT)
367361
.build()
368362
};

0 commit comments

Comments
 (0)