且构网

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

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

更新时间:2021-12-12 02:52:53

  1. 在浏览器中转到 URL:

  • firefox - 单击 HTTPS 证书链(URL 地址旁边的锁图标).点击更多信息">安全">《演出证书》>详情">导出..".选择名称并选择文件类型 example.cer
  • chrome - 在地址栏中点击左侧的站点图标,选择证书";->《详情》->出口"并以Der-encoded binary, single certificate"格式保存.
    • firefox - click on HTTPS certificate chain (the lock icon right next to URL address). Click "more info" > "security" > "show certificate" > "details" > "export..". Pickup the name and choose file type example.cer
    • chrome - click on site icon left to address in address bar, select "Certificate" -> "Details" -> "Export" and save in format "Der-encoded binary, single certificate".
  1. 现在您有了带有密钥库的文件,您必须将它添加到您的 JVM 中.确定 cacerts 文件的位置,例如.C:Program Files (x86)Javajre1.6.0_22libsecuritycacerts.

接下来在命令行中将 example.cer 文件导入 cacerts(可能需要管理员命令提示符):

Next import the example.cer file into cacerts in command line (may need administrator command prompt):

keytool -import -alias 示例 -keystore "C:Program Files (x86)Javajre1.6.0_22libsecuritycacerts"-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