根据 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)版本的能力确实使得这在应用程序中不是问题。
关于java - Apache DefaultHttpClient (Android) 和 NSURLConnection (iOS) 是否会重试与旧协议(protocol)版本的失败连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26387227/