NSUrlSession HttpClient + Apple TLS - Not Actually Working?

CoryJuhlinCoryJuhlin USMember ✭✭

With the Cycle9 release I started playing around to see if I could drop Modernhttpclient for Xamarin's own NSUrlSession HttpClient.

I switched the flag in the project options. And rebuilt. Everything works fine!

Skeptical and paranoid as I am, I wasn't convinced that the settings actually changed anything. I switched my build to use my company's internal test server that happens to just be Http (not Https).

The build is still connecting normally. I was expecting an error from Apple's TLS blocking access to an Http-only site, as I would when using Modernhttpclient.

I'm pretty sure this should not be happening. Any better ways to verify that the build flags actually changed the HttpClient subsystem?

Here's some implementation details in case that is relevant:

Network code is in a shared PCL project. I use a custom DelegatingHandler. The base handler is injected via Splat's dependency resolver. On Android, I still use Modernhttpclient's NativeMessageHandler. On iOS I just instantiate a HttpClientHandler.

Answers

  • RaghavVRaghavV USMember ✭✭

    @CoryJuhlin I have the same issue. Could you post how you resolved this? Thanks

  • IvanMaranIvanMaran USMember ✭✭

    I suspect that if you provide HttpClient with some HttpHandler (via constructor or some DoC) then corresponding projects' option (HttpClient Implementation) does not have effect.

Sign In or Register to comment.