SSLPeerUnverifiedException: Hostname 'smt9.xyz' Not Verified - Troubleshooting Guide
This exception indicates that the SSL/TLS certificate presented by the server at 'smt9.xyz' could not be verified because the hostname does not match the common name (CN) or subject alternative names (SANs) specified in the certificate.
In this particular case, the certificate's CN is '*xyz.com' and it includes a SAN of '*xyz.comxyz.com'. However, the hostname 'smt9.xyz' does not match either of these values, causing the verification to fail.
To resolve this issue, you have a few options:
-
Ensure that the server's hostname matches the CN or SANs specified in the certificate. In this case, you would need to access the server using a hostname that matches '*xyz.com' or '*xyz.comxyz.com'.
-
Obtain a new SSL/TLS certificate that includes the correct CN or SANs for the server's hostname. This would involve reissuing the certificate with the appropriate values.
-
Disable hostname verification in your SSL/TLS client code. However, this is not recommended as it may leave your application vulnerable to man-in-the-middle attacks.
It's worth mentioning that the certificate in question appears to have an invalid SAN value of '*xyz.comxyz.com'. The '.com' is duplicated, which is likely a mistake. You may need to contact the certificate issuer or the server administrator to rectify this issue.
原文地址: https://www.cveoy.top/t/topic/bMlj 著作权归作者所有。请勿转载和采集!