Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable sslv3 for NSURLconnection or NSURLSession

With respect to the recent security threat with SSLV3,https://isc.sans.edu/forums/diary/OpenSSL+SSLv3+POODLE+Vulnerability+Official+Release/18827

How can I make NSURLconnection communication secure from this threat?

Can I disable sslv3 programmaticaly in iOS?

Is there any way in iOS by which I can get the supported security protocol list from server url?

like image 523
Piyush Hirpara Avatar asked Oct 30 '14 11:10

Piyush Hirpara


1 Answers

I have figure out the way to set it into NSURLSession but still struggling with NSURLConnection.

NSURLSessionConfiguration *config =
[NSURLSessionConfiguration defaultSessionConfiguration];
config.TLSMaximumSupportedProtocol = kTLSProtocol12;
config.TLSMinimumSupportedProtocol = kTLSProtocol12  
NSURLSession *session = [NSURLSession sessionWithConfiguration:sessionConfig];
like image 118
Piyush Hirpara Avatar answered Oct 05 '22 08:10

Piyush Hirpara