Skip to content

Commit

Permalink
Revert "feat(download/rustls): use rustls-platform-verifier"
Browse files Browse the repository at this point in the history
This reverts commit fb662c5.
  • Loading branch information
rami3l committed Jun 28, 2024
1 parent f1cc01e commit e8b5a77
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 108 deletions.
144 changes: 51 additions & 93 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ default = ["reqwest-backend", "reqwest-rustls-tls", "reqwest-native-tls"]
curl-backend = ["curl"]
reqwest-backend = ["reqwest", "env_proxy"]
reqwest-native-tls = ["reqwest/native-tls", "dep:once_cell"]
reqwest-rustls-tls = [
"reqwest/rustls-tls-manual-roots-no-provider",
"dep:rustls",
"dep:rustls-platform-verifier",
"dep:once_cell",
]
reqwest-rustls-tls = ["reqwest/rustls-tls-native-roots", "dep:rustls", "dep:once_cell"]

[dependencies]
anyhow.workspace = true
Expand All @@ -24,7 +19,6 @@ env_proxy = { version = "0.4.1", optional = true }
once_cell = { workspace = true, optional = true }
reqwest = { version = "0.12", default-features = false, features = ["blocking", "gzip", "socks", "stream"], optional = true }
rustls = { version = "0.23", optional = true, default-features = false, features = ["logging", "aws_lc_rs", "tls12"] }
rustls-platform-verifier = { version = "0.3", optional = true }
thiserror.workspace = true
tokio = { workspace = true, default-features = false, features = ["sync"] }
tokio-stream.workspace = true
Expand Down
10 changes: 2 additions & 8 deletions download/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@ pub mod reqwest_be {
compile_error!("Must select a reqwest TLS backend");

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

use anyhow::{anyhow, Context, Result};
Expand Down Expand Up @@ -356,13 +354,9 @@ pub mod reqwest_be {
#[cfg(feature = "reqwest-rustls-tls")]
static CLIENT_RUSTLS_TLS: Lazy<Client> = Lazy::new(|| {
let catcher = || {
let _ = aws_lc_rs::default_provider().install_default();
client_generic()
.use_preconfigured_tls(
rustls_platform_verifier::tls_config_with_provider(Arc::new(
aws_lc_rs::default_provider(),
))
.expect("failed to initialize pre-configured rustls backend"),
)
.use_rustls_tls()
.user_agent(super::REQWEST_RUSTLS_TLS_USER_AGENT)
.build()
};
Expand Down

0 comments on commit e8b5a77

Please sign in to comment.