ios - iOS 7 下的 SSL 错误

标签 ios ssl https

我有时会在 iOS 7 下使用 AFNetworking 通过 HTTPS 连接看到 SSL 错误

以下错误消息很少出现在控制台上:

An SSL error has occurred and a secure connection to the server cannot be made.

关联

CFNetwork SSLHandshake failed (-9806) NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)

CFNetwork SSLHandshake failed (-9810) NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9810)

关于 http://www.opensource.apple.com/source/Security/Security-55179.13/libsecurity_ssl/Security/SecureTransport.h您可以找到这些错误代码的解释:

errSSLClosedAbort = -9806,    /* connection closed via error */
errSSLInternal    = -9810,    /* Internal error */

有人遇到过同样的问题吗?


今天 Apple 发布了 iOS 7.0.6,其中包含一个SSL 连接验证修复

对我来说,这听起来与以下问题更相关: Receiving SSL error in iOS7 GM - "AddTrust External CA Root" is not trusted? (错误代码-9813)

但也许新的 iOS 版本带来了一些改进作为副作用......

编辑:在 iOS 7.0.6 中修复了另一个错误(if-else-if-statement 中的双重“goto fail”)。

最佳答案

所有 -9806 和 -9810 SSL 错误都是在使用(明显错误的)WWAN 连接时发生的。 使用 WLAN 连接时,设备上不会出现此类错误。

然而,特定的 HTTPS 任务在一段时间后完成! 所以对于我们来说,我们可以忽略这些错误。

关于ios - iOS 7 下的 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21943576/

相关文章:

c++ - 没有 SSL 验证的 HTTPs 对于本地应用程序是否安全?

ios - 在设备关闭时过期的本地通知将丢失

python - 如何降级openssl

apache - 通过 htaccess : incorrect redirection error 将 http 重定向到 https

安卓 2.3 : HttpClient SSL certificate problem: Intermediate certificate lacks BasicConstraints

azure - 通过 Azure 设置 SSL 证书后运行本地主机的问题

wordpress - 将 Wordpress 站点移动到 HTTPS

ios - 从 iOS 中的 QuickBlox 历史记录中删除两个用户之间的对话

iOS:复制属性

iOS测量网页加载时间