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

喜你入骨 提交于 2019-12-04 22:56:07

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/25446175/why-ios8-ssl-requests-fail-intermittently-after-migration-from-ios7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!