服务器请求https网站证书不信任 certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

将目标网站的https证书下载到本地,然后导入到 证书列表中,即可正常请求

keytool -import -alias www.xxx.com.cer -keystore $JAVA_HOME/jre/lib/security/cacerts -file www.xxx.com.cer

keystore 的默认密码为:changeit

posted @ 2023-08-14 11:28  哦克Oak  阅读(43)  评论(0编辑  收藏  举报