Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TLS 1.1/1.2 support for Xamarin.Android

Right now I'm developing an application using Xamarin.Forms. I ran into a problem with the TLS protocol.

My application uses an API. Because of security reasons the API uses HTTPS. This week we decided to remove the support of TLS 1.0 to accept only TLS 1.1 and 1.2 on the server side, but after we made this change, I noticed that my application stoped working.

While debugging I noticed that the call of the API throws an exception (I'm using HttpClient class from .Net). By searching for solutions on the Internet, I saw that many people think the problem is related to TLS support.

I solved this problem on Android and iOS using a plugin named ModernHTTPClient but one of my customers reported me that on his device running on Android they still have the problem (he's running a device with Android 4.2).

Checking Android documentation I saw that this version have support but is not enable by default, and the hard part is that there's not much documentation in the Internet about how I can activate this.

Any advice of how I can activate this? Did Xamarin.Android have native support for TLS 1.1 and up?

Thanks

like image 963
avmauricio Avatar asked Apr 22 '16 17:04

avmauricio


People also ask

Is TLS 1.1 still supported?

As of Tuesday, March 31, TLS 1.0 and 1.1 will no longer be supported by Google , Microsoft , Apple , and Mozilla . ICs should decommission or upgrade TLS 1.0 and 1.1 to a supported cryptographic protocol.

How do you check if TLS 1.1 or 1.2 is enabled?

Click on: Start -> Control Panel -> Internet Options 2. Click on the Advanced tab 3. Scroll to the bottom and check the TLS version described in steps 3 and 4: 4. If Use SSL 2.0 is enabled, you must have TLS 1.2 enabled (checked) 5.


1 Answers

ModernHTTPClient should use the platforms' native HTTP handling. Looks like for now you can build it manually using this pull: https://github.com/paulcbetts/ModernHttpClient/pull/210

like image 159
joe Avatar answered Oct 12 '22 09:10

joe