mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
Fix NoHostnameTlsVerifier for rustls 0.23.24 and above (#3861)
This commit is contained in:
@@ -48,7 +48,7 @@ tokio = { workspace = true, optional = true }
|
||||
# TLS
|
||||
native-tls = { version = "0.2.10", optional = true }
|
||||
|
||||
rustls = { version = "0.23.15", default-features = false, features = ["std", "tls12"], optional = true }
|
||||
rustls = { version = "0.23.24", default-features = false, features = ["std", "tls12"], optional = true }
|
||||
webpki-roots = { version = "0.26", optional = true }
|
||||
rustls-native-certs = { version = "0.8.0", optional = true }
|
||||
|
||||
|
||||
@@ -309,9 +309,9 @@ impl ServerCertVerifier for NoHostnameTlsVerifier {
|
||||
ocsp_response,
|
||||
now,
|
||||
) {
|
||||
Err(TlsError::InvalidCertificate(CertificateError::NotValidForName)) => {
|
||||
Ok(ServerCertVerified::assertion())
|
||||
}
|
||||
Err(TlsError::InvalidCertificate(
|
||||
CertificateError::NotValidForName | CertificateError::NotValidForNameContext { .. },
|
||||
)) => Ok(ServerCertVerified::assertion()),
|
||||
res => res,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user