其他分享
首页 > 其他分享> > HTTPS请求不被信用

HTTPS请求不被信用

作者:互联网

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
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

 

原因:中国金融认证中心 颁发的HTTPS证书,不被JDK信赖

那只能把证书注入到JDK中,keytool是JDK自带的

切换到jre的/lib/security/下

 

 

 

keytool -import -alias abc -keystore cacerts -storepass changeit  -file C:\downpath\xxx.cer

 

然后回车: 输入 “是” 就能导入成功

 

然后执行程序访问即可

 

来源  灰信网

 

标签:请求,JDK,certification,信用,ValidatorException,HTTPS,sun,path,security
来源: https://www.cnblogs.com/zhian/p/15185462.html