Skip to content

Commit

Permalink
Upgrade to rustls-platform-verifier 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
djc authored and rami3l committed Nov 18, 2024
1 parent 0584441 commit 92f84fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ curl = { version = "0.4.44", optional = true }
env_proxy = { version = "0.4.1", 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 }
rustls-platform-verifier = { version = "0.4", optional = true }
thiserror.workspace = true
tokio = { workspace = true, default-features = false, features = ["sync"] }
tokio-stream.workspace = true
Expand Down
9 changes: 7 additions & 2 deletions download/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ pub mod reqwest_be {
use reqwest::{header, Client, ClientBuilder, Proxy, Response};
#[cfg(feature = "reqwest-rustls-tls")]
use rustls::crypto::aws_lc_rs;
#[cfg(feature = "reqwest-rustls-tls")]
use rustls_platform_verifier::BuilderVerifierExt;
use tokio_stream::StreamExt;
use url::Url;

Expand Down Expand Up @@ -357,10 +359,13 @@ pub mod reqwest_be {
let catcher = || {
client_generic()
.use_preconfigured_tls(
rustls_platform_verifier::tls_config_with_provider(Arc::new(
rustls::ClientConfig::builder_with_provider(Arc::new(
aws_lc_rs::default_provider(),
))
.expect("failed to initialize pre-configured rustls backend"),
.with_safe_default_protocol_versions()
.unwrap()
.with_platform_verifier()
.with_no_client_auth(),
)
.user_agent(super::REQWEST_RUSTLS_TLS_USER_AGENT)
.build()
Expand Down

0 comments on commit 92f84fd

Please sign in to comment.