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
触发 SSL 认证 URL 时收到以下异常。 尝试使用以下命令修复错误
/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
问题在centos 7系统中仍然存在。
最佳答案
1 。 keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass -validity 360 -keysize 2048
一些请求将显示询问您的一般数据。全部输入。
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
您的认证文件已准备就绪。
关于java - PKIX 路径构建在 Centos 7 中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57255472/