3
votes

I watched sometimes SSL errors trough a HTTPS connection using AFNetworking under iOS 7.

Following error message appeared rarely on console:

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

associated with

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

or

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

On http://www.opensource.apple.com/source/Security/Security-55179.13/libsecurity_ssl/Security/SecureTransport.h you can find explanation for these error codes:

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

Has anyone run into the same problem?


Today Apple released iOS 7.0.6 that includes a fix for SSL connection verification.

For me, it sounds more related to issues like this one: Receiving SSL error in iOS7 GM - "AddTrust External CA Root" is not trusted? (error code -9813)

But perhaps the new iOS version bring some improvement as a side effect...

EDIT: In iOS 7.0.6 another error (double "goto fail" in if-else-if-statement) was fixed.

1
Have you tested this SSL connection from another client to verify that the SSL chain is in fact configured correctly? I would test this elsewhere with an appropriate HTTP debug tool first before suggesting the 7.0.6 patch as that is something VERY different.Ethan Mateja
Thanks for your comment. This SSL connection was tested and used by a few dozen clients. The errors appeared very rarely and are not reproducible. My hope is that anyone has made similar experience under iOS 7.AppsolutEinfach
Hoping in my use of the word 'client' it is understood to be any other 'HTTP' client dev tool aside from your iOS app. For example, Curl, Paw.app, Charles.app, etc...Ethan Mateja
Yes, code was tested with several hardware and software clients...AppsolutEinfach

1 Answers

3
votes

All -9806 and -9810 SSL errors occurred while using (an apparently bad) WWAN connection. Using WLAN connection no such errors occurred on devices.

Nevertheless, the specific HTTPS task is completed after some time! So for us, we can ignore these errors.