From 2534459a5aab3a3a7cc5aca87acc0b59c1591032 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 15 Nov 2024 10:02:10 +0100 Subject: [PATCH] Upgrade rustls-platform-verifier to 0.4 --- Cargo.toml | 2 +- src/client.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e7a37de..991880f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ async-trait = "0.1.52" celes = "2.1" chrono = { version = "0.4.23", features = ["serde"] } instant-xml = { version = "0.5", features = ["chrono"] } -rustls-platform-verifier = { version = "0.3", optional = true } +rustls-platform-verifier = { version = "0.4", optional = true } serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.0", features = ["io-util", "net", "time"] } tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["logging", "tls12"] } diff --git a/src/client.rs b/src/client.rs index 2c4227e..5b9480a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -222,7 +222,7 @@ mod rustls_connector { use std::time::Duration; use async_trait::async_trait; - use rustls_platform_verifier::Verifier; + use rustls_platform_verifier::BuilderVerifierExt; use tokio::net::lookup_host; use tokio::net::TcpStream; use tokio_rustls::client::TlsStream; @@ -320,10 +320,7 @@ mod rustls_connector { identity, } = self; - let builder = ClientConfig::builder() - .dangerous() - .with_custom_certificate_verifier(Arc::new(Verifier::new())); - + let builder = ClientConfig::builder().with_platform_verifier(); let config = match identity { Some((certs, key)) => builder.with_client_auth_cert(certs, key)?, None => builder.with_no_client_auth(),