Upgrade rustls-platform-verifier to 0.4
This commit is contained in:
parent
6c760c97be
commit
2534459a5a
|
@ -18,7 +18,7 @@ async-trait = "0.1.52"
|
||||||
celes = "2.1"
|
celes = "2.1"
|
||||||
chrono = { version = "0.4.23", features = ["serde"] }
|
chrono = { version = "0.4.23", features = ["serde"] }
|
||||||
instant-xml = { version = "0.5", features = ["chrono"] }
|
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"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tokio = { version = "1.0", features = ["io-util", "net", "time"] }
|
tokio = { version = "1.0", features = ["io-util", "net", "time"] }
|
||||||
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["logging", "tls12"] }
|
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["logging", "tls12"] }
|
||||||
|
|
|
@ -222,7 +222,7 @@ mod rustls_connector {
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use rustls_platform_verifier::Verifier;
|
use rustls_platform_verifier::BuilderVerifierExt;
|
||||||
use tokio::net::lookup_host;
|
use tokio::net::lookup_host;
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio_rustls::client::TlsStream;
|
use tokio_rustls::client::TlsStream;
|
||||||
|
@ -320,10 +320,7 @@ mod rustls_connector {
|
||||||
identity,
|
identity,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
let builder = ClientConfig::builder()
|
let builder = ClientConfig::builder().with_platform_verifier();
|
||||||
.dangerous()
|
|
||||||
.with_custom_certificate_verifier(Arc::new(Verifier::new()));
|
|
||||||
|
|
||||||
let config = match identity {
|
let config = match identity {
|
||||||
Some((certs, key)) => builder.with_client_auth_cert(certs, key)?,
|
Some((certs, key)) => builder.with_client_auth_cert(certs, key)?,
|
||||||
None => builder.with_no_client_auth(),
|
None => builder.with_no_client_auth(),
|
||||||
|
|
Loading…
Reference in New Issue