Fixing the "java.security.cert.CertificateException: No subject alternative names present" Error
When consuming web services via HTTPS using Java clients, you may encounter the "java.security.cert.CertificateException: No subject alternative names present" error. To resolve this issue, follow these steps carefully:
Alternatively, you can use the suggestion from the similar question, which states that if you do not control the server, you should use its host name instead. This is because the certificate may contain a CN (Common Name) that matches the host name.
Remember, these steps are intended to resolve the specific issue of missing subject alternative names in the server's certificate. Depending on your environment and the specific service you're consuming, there may be variations or additional configurations required.
The above is the detailed content of How to Fix the 'java.security.cert.CertificateException: No subject alternative names present' Error?. For more information, please follow other related articles on the PHP Chinese website!