iOS 8.4 CFNetwork SSLHandshake failed (-9850)

二次信任 提交于 2019-12-06 02:25:34
Steve Madsen

-9850 appears in the SecureTransport.h header buried inside the iOS 9 SDK:

errSSLWeakPeerEphemeralDHKey = -9850,       /* weak ephemeral dh key  */

It sounds like Michal is on the right track. A more general search for this problem led me to http://www.chromium.org/administrators/err_ssl_weak_server_ephemeral_dh_key:

As of Chrome 45, this error message is triggered if the SSL/TLS handshake attempts to use a public key, smaller than 1024 bits, for ephemeral Diffie-Hellman key agreement.

I'm not saying that iOS 9 imposes exactly the same requirements as Chrome, but I'd start looking at the server configuration and if you can increase the key size it uses for the SSL handshake.

I believe it has something to do with coreTLS:

Description: coreTLS accepted short ephemeral Diffie-Hellman (DH) keys, as used in export-strength ephemeral DH cipher suites. This issue, also known as Logjam, allowed an attacker with a privileged network position to downgrade security to 512-bit DH if the server supported an export-strength ephemeral DH cipher suite. The issue was addressed by increasing the default minimum size allowed for DH ephemeral keys to 768 bits.

From what I can tell from your code, I guess you're using GCDAsyncSocket. It has been updated 10 months ago, so it definitely does not reflect this issue.

When I get CFNetwork SSLHandshake failed -(*) its because my device is connected to the network but not the internet.

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