Httpclient for TLS 1.2

RaghavVRaghavV USMember ✭✭

I want to enable TLS1.2 for my application. But since the web api is still in development, SSL is not enabled yet.
But the problem is the http requests succeed without any error.

This is what I have :
1. in iOS project, I have NSURLSession(ios 7+) for httpclient implementation
2. In Portable project , initialized the httpclient like this
HttpClient client = DependencyService.Get<ITouchInterface>().nativeHttpClient();
3. When initializing HttpClient, I use a dependency service and return the httpclient like this

    public HttpClient nativeHttpClient()
      {
          return new HttpClient(new NSUrlSessionHandler());
      }

4. I have not opted out of ATS
5. I call a http resource say (http://restapi.com/getinfo)

In ios 9.0 and above, this should fail because ATS would be enabled. But if I run this on an iPhone, the http request succeeds without any error.

Am I missing something?

Answers

Sign In or Register to comment.