您的位置:首页 > 移动开发 > Android开发

com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time:

2015-10-09 18:08 302 查看
http://www.cnblogs.com/mayongsheng/p/4387109.html
https://github.com/awslabs/aws-sdk-android-samples/issues/26
最近使用google的Volley框架遇到一个下载图片的异常com.android.volley.error.NoConnectionError: javax.net.ssl.SSLHandshakeException: com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Sat Aug 15 05:14:42 GMT+08:00 1970, validation time: Fri Apr 05 23:15:55 GMT+08:00 2013

通过查看日志发现这个图片的下载地址和其他正常的下载地址不一样,使用的是https协议,但我们产品中以前的图片都是http协议,这几个有问题的图片是UI的妹子随便从某个地方下载的,

然后出现了这个问题,google了一下,这个异常说的是在校验证书的时候出现时间校验失败!打开手机的设置,发现手机上的时间居然是好几年前。。。然后,调整好手机时间即可正常下载。

不过这种解决方式很死板,怎么可能让用户这么作呢!!!

有几位大牛提供了解决方案:
http://my.oschina.net/blackylin/blog/144136 http://www.eoeandroid.com/thread-161747-1-1.html
然后还有一篇关于https协议的好博文:
http://www.cnblogs.com/P_Chou/archive/2010/12/27/https-ssl-certification.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: