Skip to content

Commit 92f84fd

Browse files
djcrami3l
authored andcommitted
Upgrade to rustls-platform-verifier 0.4
1 parent 0584441 commit 92f84fd

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Cargo.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

download/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ curl = { version = "0.4.44", optional = true }
2121
env_proxy = { version = "0.4.1", optional = true }
2222
reqwest = { version = "0.12", default-features = false, features = ["blocking", "gzip", "socks", "stream"], optional = true }
2323
rustls = { version = "0.23", optional = true, default-features = false, features = ["logging", "aws_lc_rs", "tls12"] }
24-
rustls-platform-verifier = { version = "0.3", optional = true }
24+
rustls-platform-verifier = { version = "0.4", optional = true }
2525
thiserror.workspace = true
2626
tokio = { workspace = true, default-features = false, features = ["sync"] }
2727
tokio-stream.workspace = true

download/src/lib.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ pub mod reqwest_be {
303303
use reqwest::{header, Client, ClientBuilder, Proxy, Response};
304304
#[cfg(feature = "reqwest-rustls-tls")]
305305
use rustls::crypto::aws_lc_rs;
306+
#[cfg(feature = "reqwest-rustls-tls")]
307+
use rustls_platform_verifier::BuilderVerifierExt;
306308
use tokio_stream::StreamExt;
307309
use url::Url;
308310

@@ -357,10 +359,13 @@ pub mod reqwest_be {
357359
let catcher = || {
358360
client_generic()
359361
.use_preconfigured_tls(
360-
rustls_platform_verifier::tls_config_with_provider(Arc::new(
362+
rustls::ClientConfig::builder_with_provider(Arc::new(
361363
aws_lc_rs::default_provider(),
362364
))
363-
.expect("failed to initialize pre-configured rustls backend"),
365+
.with_safe_default_protocol_versions()
366+
.unwrap()
367+
.with_platform_verifier()
368+
.with_no_client_auth(),
364369
)
365370
.user_agent(super::REQWEST_RUSTLS_TLS_USER_AGENT)
366371
.build()

0 commit comments

Comments
 (0)