欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

unable to find valid certification path to requested target

程序员文章站 2022-05-01 14:45:49
...

导出证书

访问网站,点击锁图标:
unable to find valid certification path to requested target
查看新页面中的查看证书:
unable to find valid certification path to requested target
点击详细信息中的复制到文件:
unable to find valid certification path to requested target
选择加密方式:
unable to find valid certification path to requested target

导入证书

切换到jre的/lib/security/下

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

其中:
-alias 指定别名(推荐和证书同名)
-keystore 指定存储文件(此处固定)
-file 指定证书文件全路径(证书文件所在的目录)
注意:当切换到 cacerts 文件所在的目录时,才可指定 -keystore cacerts, 否则应该指定全路径;
此时命令行会提示你输入cacerts证书库的密码,敲入changeit即可,这是java中cacerts证书库的默认密码,当然也可自行修改。
库**口令输入:changeit
unable to find valid certification path to requested target
unable to find valid certification path to requested target
查看证书,**仍然是changeit

keytool -list -keystore cacerts -alias abc

unable to find valid certification path to requested target

Refer to

https://blog.csdn.net/gabriel576282253/article/details/81531746