Fixing the "java.security.cert.CertificateException: No subject alternative names present" Error
In Java web service clients consuming HTTPS services, the "java.security.cert.CertificateException: No subject alternative names present" error occurs when the certificate lacks subject alternative names. Here's a step-by-step solution:
To fix this issue:
Alternatively, to use the host name instead of the certificate:
static { disableSslVerification(); } private static void disableSslVerification() { // ... same code as above for disabling SSL verification ... }
The above is the detailed content of How to Fix the 'java.security.cert.CertificateException: No subject alternative names present' Error in Java Web Services?. For more information, please follow other related articles on the PHP Chinese website!