Https报错java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

经验是个让人头疼的问题啊!!!


HTTPS请求,服务端提供的证书

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

证书生成的过程 看上一篇或者自行百度就好啦

这里主要提供解决办法,本人在这个坑里栽了两次了,所以说经验是个好东西啊,,,,, 原来一直以为是android端没生成好,找了好多,最后确定是服务端提供的证书有问题额。。。。

不扯这了,我目前认为的解决办法有两个

1)请服务端提供正确的证书文件

2)android客户端自行绕过验证(怎么绕过,搜一下就行了,我就不多说了),个人觉得,如果绕过的话。。。 写https还有什么意义吗


以上问题,让自己多长个记性,经验真的很重要啊啊


猜你喜欢

转载自blog.csdn.net/zww986736788/article/details/78431992
今日推荐