mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-13 17:27:50 +00:00
Update rustls to 0.21, webpki-roots to 0.23 (#2440)
This commit is contained in:
parent
0dfebb202f
commit
8f4063c511
@ -36,9 +36,9 @@ tokio = { workspace = true, optional = true }
|
||||
# TLS
|
||||
native-tls = { version = "0.2.10", optional = true }
|
||||
|
||||
rustls = { version = "0.20.6", default-features = false, features = ["dangerous_configuration", "tls12"], optional = true }
|
||||
rustls = { version = "0.21", default-features = false, features = ["dangerous_configuration", "tls12"], optional = true }
|
||||
rustls-pemfile = { version = "1.0", optional = true }
|
||||
webpki-roots = { version = "0.22.0", optional = true }
|
||||
webpki-roots = { version = "0.23", optional = true }
|
||||
|
||||
# Type Integrations
|
||||
bit-vec = { workspace = true, optional = true }
|
||||
|
||||
@ -6,7 +6,8 @@ use std::time::SystemTime;
|
||||
|
||||
use rustls::{
|
||||
client::{ServerCertVerified, ServerCertVerifier, WebPkiVerifier},
|
||||
ClientConfig, ClientConnection, Error as TlsError, OwnedTrustAnchor, RootCertStore, ServerName,
|
||||
CertificateError, ClientConfig, ClientConnection, Error as TlsError, OwnedTrustAnchor,
|
||||
RootCertStore, ServerName,
|
||||
};
|
||||
|
||||
use crate::error::Error;
|
||||
@ -234,8 +235,8 @@ impl ServerCertVerifier for NoHostnameTlsVerifier {
|
||||
ocsp_response,
|
||||
now,
|
||||
) {
|
||||
Err(TlsError::InvalidCertificateData(reason))
|
||||
if reason.contains("CertNotValidForName") =>
|
||||
Err(TlsError::InvalidCertificate(reason))
|
||||
if reason == CertificateError::NotValidForName =>
|
||||
{
|
||||
Ok(ServerCertVerified::assertion())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user