Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Httpclient for TLS 1.2

$
0
0

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?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>