From 8cd520f21ab5b72ef24bc5da7268fd5eb21beb7a Mon Sep 17 00:00:00 2001 From: Quentin de Metz Date: Mon, 23 Feb 2026 11:36:20 +0100 Subject: [PATCH 1/2] Update verify_ca implementation for rustls 0.23 --- pgdog/src/net/tls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgdog/src/net/tls.rs b/pgdog/src/net/tls.rs index b347aa11c..22be632d5 100644 --- a/pgdog/src/net/tls.rs +++ b/pgdog/src/net/tls.rs @@ -382,7 +382,7 @@ impl ServerCertVerifier for NoHostnameVerifier { debug!("certificate validation successful (ignoring hostname)"); Ok(ServerCertVerified::assertion()) } - Err(rustls::Error::InvalidCertificate(rustls::CertificateError::NotValidForName)) => { + Err(rustls::Error::InvalidCertificate(rustls::CertificateError::NotValidForNameContext { .. })) => { // If the only error is hostname mismatch, that's fine for Certificate mode debug!("certificate validation successful (hostname mismatch ignored)"); Ok(ServerCertVerified::assertion()) From c1edc1ba1889b53f4438c63c50048906a29a0d6f Mon Sep 17 00:00:00 2001 From: Quentin de Metz Date: Mon, 23 Feb 2026 17:04:03 +0100 Subject: [PATCH 2/2] format --- pgdog/src/net/tls.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pgdog/src/net/tls.rs b/pgdog/src/net/tls.rs index 22be632d5..0e295bd58 100644 --- a/pgdog/src/net/tls.rs +++ b/pgdog/src/net/tls.rs @@ -382,7 +382,9 @@ impl ServerCertVerifier for NoHostnameVerifier { debug!("certificate validation successful (ignoring hostname)"); Ok(ServerCertVerified::assertion()) } - Err(rustls::Error::InvalidCertificate(rustls::CertificateError::NotValidForNameContext { .. })) => { + Err(rustls::Error::InvalidCertificate( + rustls::CertificateError::NotValidForNameContext { .. }, + )) => { // If the only error is hostname mismatch, that's fine for Certificate mode debug!("certificate validation successful (hostname mismatch ignored)"); Ok(ServerCertVerified::assertion())