java - Apache DefaultHttpClient (Android) 和 NSURLConnection (iOS) 是否会重试与旧协议(protocol)版本的失败连接?

标签 java android ios ssl

根据 POODLE 漏洞的披露,Google makes the following statement :

In order to work around bugs in HTTPS servers, browsers will retry failed connections with older protocol versions, including SSL 3.0

DefaultHttpClient 也是如此吗? Java 库和 Objective C NSURLConnection类(class)?我相信答案是否定的,但我想仔细检查一下。

最佳答案

经过更多测试后完全编辑我的答案,HttpUrlConnection 和 NSURLConnection 似乎都在重试失败的 TLS 连接与较旧的 SSLv3 连接。不管是好是坏,这是有意向后兼容配置不正确的服务器的功能,并且在大多数地方的大多数引用文档中都有记录,否则您必须深入研究 native 代码源。我原来的帖子是不正确的,因为我从未跟踪 Oracle 更改以将此问题解决到 native Android 代码中。 http://www.oracle.com/technetwork/java/javase/overview/tlsreadme2-176330.html

一些文档:

HttpUrlConnection

TLS Intolerance Support

This class attempts to create secure connections using common TLS extensions and SSL deflate compression. Should that fail, the connection will be retried with SSLv3 only.

好的HTTP

OkHttp initiates new connections with modern TLS features (SNI, ALPN), and falls back to SSLv3 if the handshake fails.

综上所述,我认为在 iOS 中设置允许的最低 TLS 版本的能力以及在 Android 中指定支持的协议(protocol)版本的能力确实使得这在应用程序中不是问题。

iOS 示例: https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSessionConfiguration_class/index.html#//apple_ref/occ/instp/NSURLSessionConfiguration/TLSMinimumSupportedProtocol

关于java - Apache DefaultHttpClient (Android) 和 NSURLConnection (iOS) 是否会重试与旧协议(protocol)版本的失败连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26387227/

相关文章:

java - 在屏幕上随机生成一个圆圈,并使其变为绿色或红色

java - 如何用 Volley 替换 AsyncTask

ios - NSAttributedString 的初始化使应用程序崩溃

ios - 使用 Swift 3.0 查询 Firebase

ios - 应用程序安装失败。无法检查应用程序包

java - Mockito when() 需要一个必须是 'method call on a mock' 错误的参数

java - 限制 findAll() 结果

java - 使用java swing删除选定的复选框

android - Android Studio 模拟器报错 "EGL_BAD_MATCH"

ANDROID 未授予权限