"不信任的服务器证书"在Android 2.2的而不是3.0 [英] "Not trusted Server Certificate" in Android 2.2 but not 3.0

查看:140
本文介绍了"不信任的服务器证书"在Android 2.2的而不是3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的BouncyCastle的供应商和Apache的HttpClient信任的SSL证书,由安东尼·豪克的这里

I'm using the BouncyCastle provider and Apache HttpClient to trust an SSL certificate, as described by Antoine Hauck here.

该应用程序我做的目标是Android 1.5,和作品在模拟器上运行3.0的设备的罚款。然而,当我尝试测试它在2.2(银河S),一个异常SSLException,不受信任服务器证书,会出现。

The app I've made targets Android 1.5, and works fine on the emulator and a device running 3.0. However, when I try to test it on 2.2 (Galaxy S), an SSLException, "Not trusted Server Certificate", occurs.

由于没有错误抱怨BouncyCastle的本身,我假设该设备不会从.bks文件正确读取证书。就是我试图可能在Android版本2.2使用BouncyCastle的,或者做一些事情只是需要从工作程序3.0改变?

Since there's no errors complaining about BouncyCastle itself, I'm assuming the device is not reading the certificates properly from the .bks file. Is what I'm attempting possible using BouncyCastle on Android version 2.2, or does something just need to be altered from the working 3.0 app?

更新

当我试图运行应用程序今天再次,它的工作正确的第一次。现在我已经尝试过几次,有时运行正常,但有时仍然得到了异常SSLException。似乎没有要任何图案出现这种情况时到 - 它可能连续工作了几下,然后反复失败

When I tried to run the app again today, it worked correctly the first time. I've tried it several times now, and it sometimes runs properly but sometimes still gets the SSLException. There doesn't seem to be any pattern to when this occurs - it might work a few times in a row and then fail repeatedly.

推荐答案

可能是证书的提供者不被信任,请检查信任的提供商

Could be the provider of the certificate is not trusted, try checking trusted providers

这篇关于"不信任的服务器证书"在Android 2.2的而不是3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆