Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why iOS8 SSL requests fail intermittently after migration from iOS7? [closed]

I have an iOS app, which works fine on iOS7. Now we are testing it on iOS8, and when running under iOS8, we have SSL issues. Some (but not all) SSL requests fail. All requests are against the same server, with a SSL certificate that is valid, and works on desktop, and works when the same app is running iOS7.

The error we are getting is kCFURLErrorSecureConnectionFailed, which Apple documents to be:

The secure connection failed for an unknown reason.

Also, I get the following logged in the console:

CFNetwork SSLHandshake failed (-9846)

We are using NSURLConnection. We have implemented connection: willSendRequestForAuthenticationChallenge, but it does not get called when we get the error.

Do anyone know if this is a known iOS8 issue? What would be my next steps to finding out, why these requests fail?

like image 885
driis Avatar asked Aug 22 '14 11:08

driis


2 Answers

The error you are seeing is a SecureTransport error. Error -9846 is errSSLBadRecordMac. This is a transport level error in the SSL mechanism, and is typically caused by a bug in the implementation - Apple's, not yours in this case. Please reduce it to a test case and file a bug:

https://bugreport.apple.com

like image 64
quellish Avatar answered Oct 17 '22 21:10

quellish


This turned out to actually be a bug in the firmware for the loadbalancer running the site. We upgraded the firmware, and everything now works as expected.

like image 1
driis Avatar answered Oct 17 '22 22:10

driis