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

Xamarin Android TLS 1.2 Requests not working in android device version below 5.0

$
0
0

I am using ModernHttpClient for calling webservices to enable TLS 1.2 support. And this is working fine in device versions below 5.0.

To fix the issue in 4.0 devices i forked the library and set the socket factory settings as suggested in many forms,

if (((int)Build.VERSION.SdkInt) < 21)
{
var socketFactory = new ImprovedSSLSocketFactory();
client.SetSocketFactory(socketFactory);

            //client.Init(null, new ITrustManager[] { new CustomX509TrustManager(trustManagers[0].JavaCast<IX509TrustManager>()) }, null);
        }

But still the issue is there. Now i am getting the error.

Javax.Net.SSl.SSLHandshakeException :
java.security.cert.CertPathValidationException:
Trust anchor for certification path not found

Please help


Viewing all articles
Browse latest Browse all 204402

Trending Articles