Some times i'm getting CFNetwork SSLHandshake failed -(9806)
in my code,but i'm not sure why this is happening as my code runs smoothly,except when i run it in iOS 6 and then on iOS 7 64-bit i get this warning.
Can anybody suggest me, how to handle this issue ?

- 14,933
- 2
- 50
- 75

- 1,806
- 2
- 20
- 40
-
3Please stop editing questions en masse. When you do this with old questions all you are doing is bumping them to the top of the timeline. This is bad as new questions are pushed down. – Fogmeister Jan 02 '14 at 12:06
-
1@Fogmeister Day before yesterday 31 of the top 100 active iOS questions were courtesy of Arun_k – OGHaza Jan 02 '14 at 14:19
-
@Fogmeister i had no idea about this thing,thanks for the info – Arun_ Jan 03 '14 at 06:16
-
I'm assuming from your tags, this is when using `NSURLConnection`. Can you specify that in the question please, and where in your code you're seeing this error? – Mike Abdullah Jan 14 '14 at 14:10
-
Sorry @MikeAbdullah,this issue i was facing in my previous project and currently i'm not working for that company and i don't really remember that part of the code as there were 6-7 requests we are firing upon application launch. – Arun_ Jan 17 '14 at 06:51
-
This might help when trying to understand the error code: http://www.opensource.apple.com/source/libsecurity_ssl/libsecurity_ssl-32463/lib/SecureTransport.h – eremzeit Apr 15 '15 at 04:06
-
You may have missed to set [request setHTTPMethod:@"POST"]; – Suhail Bhat Apr 27 '15 at 14:59
5 Answers
Normally when I get CFNetwork SSLHandshake failed -(*)
Its because of my local wifi network (device is connected to network but not the internet)
Try it again on another network (3G is the quickest solution for me)

- 479
- 5
- 6
-
-
-
1This does not make your app crash. These are just warnings. make sure you have strong reachability for all your requests. ZCheers – Abdul Yasin Jun 04 '14 at 09:12
This could also happen because of iOS 9. iOS 9 and OSX 10.11 require TLSv1.2 SSL for all hosts you plan to request data from unless you specify exception domains in your app's Info.plist file.
You can find more info here: https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/
Or Steven Peterson's answer here, which is quite clear: https://stackoverflow.com/a/30720929/1485701
-
Great advice. Just one more thing to add which is not described in Steven Peterson answer which is pointed. The default value of `NSTemporaryExceptionRequiresForwardSecrecy` is true, therefore your server should has it enabled also(which is recommended to fix some vulnerabilities) or you should explicity set it to false in your iOS app(not recommended). – hris.to Jan 08 '16 at 09:28
Had the same issue and after I have confirmed that the server is getting the POST the solution was this:
- Clean the project: Product -> Clean
- Delete your app from the iOS device/iOS Simulator and quit the Simulator
- Compile your app and run it
In my case, simple as that.

- 4,687
- 1
- 47
- 57
I had the same problem, and in my case the solution was that in my code I wrote
initWithScheme:@"https"
instead of
initWithScheme:@"http"
So make sure you use the correct protocol

- 1,021
- 1
- 11
- 17
Another solution: check if date/time is set correctly in your phone. SSL certificates are valid UNTIL certain date.

- 1
- 1

- 49
- 5