chore: Update to rustls 0.21 (#1340)
This commit is contained in:
+2
-2
@@ -80,8 +80,8 @@ axum = {version = "0.6.9", default_features = false, optional = true}
|
||||
async-stream = { version = "0.3", optional = true }
|
||||
rustls-pemfile = { version = "1.0", optional = true }
|
||||
rustls-native-certs = { version = "0.6.1", optional = true }
|
||||
tokio-rustls = { version = "0.23.1", optional = true }
|
||||
webpki-roots = { version = "0.22.1", optional = true }
|
||||
tokio-rustls = { version = "0.24.0", optional = true }
|
||||
webpki-roots = { version = "0.23.0", optional = true }
|
||||
|
||||
# compression
|
||||
flate2 = {version = "1.0", optional = true}
|
||||
|
||||
@@ -128,14 +128,15 @@ impl TlsAcceptor {
|
||||
use tokio_rustls::rustls::server::AllowAnyAnonymousOrAuthenticatedClient;
|
||||
let mut roots = RootCertStore::empty();
|
||||
rustls_keys::add_certs_from_pem(std::io::Cursor::new(&cert.pem[..]), &mut roots)?;
|
||||
builder
|
||||
.with_client_cert_verifier(AllowAnyAnonymousOrAuthenticatedClient::new(roots))
|
||||
builder.with_client_cert_verifier(
|
||||
AllowAnyAnonymousOrAuthenticatedClient::new(roots).boxed(),
|
||||
)
|
||||
}
|
||||
(Some(cert), false) => {
|
||||
use tokio_rustls::rustls::server::AllowAnyAuthenticatedClient;
|
||||
let mut roots = RootCertStore::empty();
|
||||
rustls_keys::add_certs_from_pem(std::io::Cursor::new(&cert.pem[..]), &mut roots)?;
|
||||
builder.with_client_cert_verifier(AllowAnyAuthenticatedClient::new(roots))
|
||||
builder.with_client_cert_verifier(AllowAnyAuthenticatedClient::new(roots).boxed())
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user