File tree Expand file tree Collapse file tree
driver-core/src/main/com/mongodb/internal/connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232
3333import javax .net .ssl .SSLHandshakeException ;
3434import javax .net .ssl .SSLPeerUnverifiedException ;
35+ import javax .net .ssl .SSLProtocolException ;
36+ import java .security .cert .CertPathBuilderException ;
3537import java .security .cert .CertPathValidatorException ;
3638import java .security .cert .CertificateException ;
3739import java .util .Optional ;
@@ -180,9 +182,11 @@ boolean relatedToTlsConfigurationError() {
180182 while (cause != null ) {
181183 // Check for various certificate validation and TLS configuration errors
182184 if (cause instanceof CertificateException
185+ || cause instanceof CertPathBuilderException
183186 || cause instanceof CertPathValidatorException
184- || cause instanceof SSLPeerUnverifiedException ) {
185- return true ; // Certificate/peer validation failure
187+ || cause instanceof SSLPeerUnverifiedException
188+ || cause instanceof SSLProtocolException ) {
189+ return true ; // Certificate/peer validation failure or protocol error
186190 }
187191
188192 // Check for SunCertPathBuilderException by class name to avoid compile-time dependency on internal classes
You can’t perform that action at this time.
0 commit comments