且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“PKIX路径构建失败”和“无法找到所请求目标的有效证书路径”

更新时间:2021-08-02 02:50:51


  1. 转到firefox浏览器中的URL,单击HTTPS证书链(URL地址旁边)。点击更多信息> 安全> show certificate> 详情> 出口..。选择名称并选择文件类型example.cer。现在你有了使用密钥库的文件,你必须将它添加到你的JVM

  1. Go to URL in your firefox browser, click on HTTPS certificate chain (next to URL address). Click "more info" > "security" > "show certificate" > "details" > "export..". Pickup the name and choose file type example.cer. Now you have file with keystore and you have to add it to your JVM

确定cacerts文件的位置,例如。
C:\Program Files(x86)\ Java \ jre1.6.0_22 \lib \ security \ cacerts。

Determine location of cacerts files, eg. C:\Program Files (x86)\Java\jre1.6.0_22\lib\security\cacerts.

接下来,在命令行中将 example.cer 文件导入cacerts:

Next import the example.cer file into cacerts in command line:

keytool -import -alias示例-keystore C:\Program Files(x86)\ Java * \\ _jre1.6.0_22 \ lib\security\cacerts -file example.cer

您将被要求输入密码,默认值为 changeit

You will be asked for password which default is changeit

重启你的JVM / PC。

Restart your JVM/PC.

来源:
http://magicmonster.com/kb/prg/java/ssl/pkix_path_building_failed.html