读取错误:SSL 库失败,通常是协议错误

发布于 2024-12-24 02:20:39 字数 284 浏览 4 评论 0原文

我正在尝试使用 DefaultHttpClient 访问安全 url。 我正在使用 portecel 工具创建 BKS 文件。

使用相同的方法创建的jks文件在java程序中工作正常,但bks抛出以下异常:

java.io.IOException:读取错误:SSL库中的失败,通常是协议错误

我能够在a中打开bks文件密钥库资源管理器并查看详细信息。

同样的情况在 Android 2.3 中工作正常,但在 2.2 中则不然,

请告诉我是否有人遇到过这样的问题并解决了它。

I am trying to access an secure url by using a DefaultHttpClient.
I am creating BKS file using portecel tool.

The jks file created using the same is working fine in java program but the bks is throwing the following exception:

java.io.IOException: Read error: Failure in SSL library, usually a protocol error

I am able to open the bks file in a keystore explorer and see the details.

The same is working fine in Android 2.3 but not in 2.2

let me know if anybody has faced such problem and solved it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

默嘫て 2024-12-31 02:20:39

我在我的一个应用程序中遇到了同样的问题。经过一番谷歌搜索后,我发现了一个 来自 k9mail 的错误报告,它引用了Android 2.2 上的此错误报告以及其他一些帖子表明这是 2.2 中的框架错误。

我发现了多个来源像这个提到导入证书服务器端必须以某种特定的顺序完成,以便 Android 接受它。由于我无法控制服务器,所以我没有选择这个选项,而且我不知道它是否真的有效;然而,您可能会对进一步调查感兴趣。

I encountered the same problem in one of my applications. After googling a bit I found a bugreport from k9mail which refers to this bugreport on Android 2.2 and some more posts all indicating this is a framework bug in 2.2.

I found several sources like this one mentioning that importing the certificates server-side has to be done in some specific order, in order for Android to accept it. Since I have no control over the server I didn't pursue this option and I have no clue if it actually works; however, it might be interesting for you to investigate further.

旧话新听 2024-12-31 02:20:39

检查服务器是否需要客户端身份验证。

Check whether the server want client authentication.

我一直都在从未离去 2024-12-31 02:20:39

我在改造库时遇到了这个问题。我解决了这个更改,“https://10.0.3.2:4567”到“http://10.0.3.2:4567" 在我的 URL 连接中。

I had this problem with Retrofit Library. I solved this change, "https://10.0.3.2:4567" to "http://10.0.3.2:4567" in my URL connection.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文