0
votes

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Receiving following exception while triggering the SSL certified URL. Tried to fix the error by using following command

/opt/jdk1.8.0_51/jre/bin/keytool -import –alias -genkey –keystore “/opt/jdk1.8.0_51/jre/lib/security/cacerts” -file /apps/binlistlookup/src/main/resources/binlistnet.crt

The issue is still percieving in centos 7 system.

1
Confirm certificate you are putting is same JDK which generates error, Confirm certificate format, Certificate is ROOT certificate to ensure reliability. For help in process refer this post.positivecrux

1 Answers

0
votes

1 . keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass -validity 360 -keysize 2048

Some request will be shown asking your general datas. Enter all of them.

2 . keytool -v -list -keystore keystore.jks

3 . keytool -exportcert -rfc -alias selfsigned -keystore keystore.jks -file selfsigned.crt

4 . keytool -printcert -file selfsigned.crt

Your cerfication file is ready.