ssl报错问题解决

当遇到'unable to find valid certification path to requested target'错误时,可以通过下载证书并将其添加到信任存储来解决。使用特定命令从URL下载证书,并保存为独立文件。接着,利用keytool工具将证书导入JRE信任存储,确保每个导入的别名不同,且使用正确的信任存储密码。重新启动应用后,SSL问题应得到解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考文档:Solve “unable to find valid certification path to requested target” | Packagecloud Blog

An alternate way to download the certificate is to use the below command with the URL you want to access.

openssl s_client -showcerts -connect <URL:443>

           

The command will output all the certificates included in the chain. The output will be as follows.

CONNECTED(00000003)
depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R1
verify return:1
depth=1 C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
verify return:1
depth=0 CN = *.google.com
verify return:1
---
Certificate chain
 0 s:CN = *.google.com
   i:C = US, O = Google
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值