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(),