彻底解决unable to find valid certification path to requested tar

时间:2024-04-03 12:28:44
                     
unable to find valid certification path to requested target
  • 1

这个问题困扰我好久了,之前找到过一个解决方案,可是没用几天那个方案就不怎么奏效了,每次生成的jssecacerts第二天还是会报错。

关于上一个解决方案,参考

Could not connect to SMTP host,PKIX path building failed

今天尝试了另外一个方案,安装证书。

下载证书

第一步是要下载证书

去你程序要访问的网站,点击那个锁按钮,并点击查看详情(chrome浏览器)

彻底解决unable to find valid certification path to requested tar

点击View certificate

彻底解决unable to find valid certification path to requested tar

点击详细信息

彻底解决unable to find valid certification path to requested tar

复制到文件

下一步

彻底解决unable to find valid certification path to requested tar

选择格式

彻底解决unable to find valid certification path to requested tar

生成的名称,最后保存

彻底解决unable to find valid certification path to requested tar

彻底解决unable to find valid certification path to requested tar

彻底解决unable to find valid certification path to requested tar

这里我保存在的D盘根目录下叫abc.cer

导入证书

切换到jre的/lib/security/下

彻底解决unable to find valid certification path to requested tar

执行如下命令

keytool -import -alias abc -keystore cacerts -file D://abc.cer
  • 1

库**口令输入:changeit

将会看到如下的信息

彻底解决unable to find valid certification path to requested tar

是否信任:Y

彻底解决unable to find valid certification path to requested tar

证书导入成功

查看证书,**仍然是changeit

keytool -list -keystore cacerts -alias vbooking
  • 1

彻底解决unable to find valid certification path to requested tar

至此证书导入成功。

重新运行程序,看还会不会报错。

参考文献

http://www.mamicode.com/info-detail-99920.html

           
                     
unable to find valid certification path to requested target
  • 1

这个问题困扰我好久了,之前找到过一个解决方案,可是没用几天那个方案就不怎么奏效了,每次生成的jssecacerts第二天还是会报错。

关于上一个解决方案,参考

Could not connect to SMTP host,PKIX path building failed

今天尝试了另外一个方案,安装证书。

下载证书

第一步是要下载证书

去你程序要访问的网站,点击那个锁按钮,并点击查看详情(chrome浏览器)

彻底解决unable to find valid certification path to requested tar

点击View certificate

彻底解决unable to find valid certification path to requested tar

点击详细信息

彻底解决unable to find valid certification path to requested tar

复制到文件

下一步

彻底解决unable to find valid certification path to requested tar

选择格式

彻底解决unable to find valid certification path to requested tar

生成的名称,最后保存

彻底解决unable to find valid certification path to requested tar

彻底解决unable to find valid certification path to requested tar

彻底解决unable to find valid certification path to requested tar

这里我保存在的D盘根目录下叫abc.cer

导入证书

切换到jre的/lib/security/下

彻底解决unable to find valid certification path to requested tar

执行如下命令

keytool -import -alias abc -keystore cacerts -file D://abc.cer
  • 1

库**口令输入:changeit

将会看到如下的信息

彻底解决unable to find valid certification path to requested tar

是否信任:Y

彻底解决unable to find valid certification path to requested tar

证书导入成功

查看证书,**仍然是changeit

keytool -list -keystore cacerts -alias vbooking
  • 1

彻底解决unable to find valid certification path to requested tar

至此证书导入成功。

重新运行程序,看还会不会报错。

参考文献

http://www.mamicode.com/info-detail-99920.html