Android 是否存在 1024 位证书问题?

发布于 2024-11-27 17:08:10 字数 2684 浏览 2 评论 0原文

我遇到了一个问题,Android(版本 3.1 和 2.3.4)抛出:

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 

访问具有 Versign V3 1024 位证书(CN = VeriSign Class 3 Secure Server CA - G2)的 RSS 服务器时出错。我可以使用 Versign V3 2048 位证书访问不同的服务器,这很好。有谁知道 Android 是否存在旧版 1024 位证书的问题?

实际的堆栈跟踪如下所示:

08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260): Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:80)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:56)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:451)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     ... 10 more

I have run into an issue where Android (versions 3.1 and 2.3.4) throws a:

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 

error accessing an RSS server that has a Versign V3 1024-bit certificate (CN = VeriSign Class 3 Secure Server CA - G2). I can access a different server using a Versign V3 2048-bit certificate and it is fine. Does anyone know if Android has issues with the older 1024-bit certficates?

The actual stacktrace looks like this:

08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260): Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:80)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:56)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:451)
08-01 08:24:54.390: ERROR/DownloadRssFeedTask(1260):     ... 10 more

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

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

发布评论

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

评论(1

揽清风入怀 2024-12-04 17:08:10

您应该看看这个帖子:

1024-bit SSL 证书提供程序

它看起来像它太弱了,无法使用 1024 位 ssl 证书。我查看了 来自的代码apache Harmony,但 API 似乎有点复杂(说实话,有些字段是在 SSLImpl 类之外修改的,所以很笨拙),而且我找不到更多信息。

看起来最好的解决方案是向您的网络托管提供商索取现代 2048 位 x509 证书。

问候,
史蒂芬

You should have a look at this thread :

1024-bit SSL certificates provider

It looks like it's just too weak to use 1024 bits ssl certificates. I looked at the code from apache harmony but the API seems to be a bit complex (and clumsy to be honest as some fields are modified outside the SSLImpl class), and I couldn't find much more information.

It looks like the best solution would be to ask for a modern 2048 bits x509 certificate form your web hosting provider.

Regards,
Stéphane

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