PKIX path validation failed: java.security.cert.CertPathValidatorException: name constraints check failed

Viewed 741

I am getting below error while service to service API communication. certificate is already imported in the java keystore.

[ERROR]: I/O error on GET request for "https://url.com/data-api/customer": PKIX path validation failed: java.security.cert.CertPathValidatorException: name constraints check failed; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPathValidatorException: name constraints check failed

1 Answers

I resolved the issue my self. I had to import the application url SSL certificate to java keystore. This was not required in the Dev and Staging environment though even the SSL cert was used on all environment. I am glad that issue got fixed after importing cert.

keytool -importcert -file ./prod.cer -cacerts -keypass <password> -storepass <password> -noprompt -alias prod-cert
Related