/ Software

iOS9: Sudden kCFStreamErrorDomainSSL Errors

Suddenly after upgrading my OS to El Capitan and downloading iOS 9 SDK for Xcode I began to experience the following errors when trying to reach Facebook Graph API:

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

Error:Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." ... _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamPropertySSLClientCertificateState=0, _kCFStreamErrorDomainKey=3, kCFStreamPropertySSLPeerCertificates=<CFArray 0x7c66c1f0 [0xf72098]>{type = immutable, count = 2, values = (
	0 : <cert(0x7ae10150) s: *.facebook.com i: DigiCert High Assurance CA-3>
	1 : <cert(0x7ae0fd30) s: DigiCert High Assurance CA-3 i: DigiCert High Assurance EV Root CA>
)}, NSErrorFailingURLStringKey=https://graph.facebook.com/v2.3/me?access_token=...

Apparently iOS 9 and Mac OS 10.11 require TLS v1.2 instead of 1.0 by default unless you specify otherwise. Here is a relevant stackoverflow entry.

Koray Alkan

Koray Alkan

Software Developer @Bloomberg. Love classical music, reading and playing the trumpet. Opinions are my own.

Read More