diff --git a/src/Mono.Android/Xamarin.Android.Net/ServerCertificateCustomValidator.cs b/src/Mono.Android/Xamarin.Android.Net/ServerCertificateCustomValidator.cs index 77427cfea10..f861f97a8ec 100644 --- a/src/Mono.Android/Xamarin.Android.Net/ServerCertificateCustomValidator.cs +++ b/src/Mono.Android/Xamarin.Android.Net/ServerCertificateCustomValidator.cs @@ -6,6 +6,7 @@ using System.Security.Cryptography.X509Certificates; using Android.OS; +using Android.Net.Http; using Android.Runtime; using Javax.Net.Ssl; @@ -53,7 +54,8 @@ public void CheckServerTrusted (JavaX509Certificate[] javaChain, string authType var sslPolicyErrors = SslPolicyErrors.None; try { - _internalTrustManager.CheckServerTrusted (javaChain, authType); + var trustManagerExtensions = new X509TrustManagerExtensions (_internalTrustManager); + trustManagerExtensions.CheckServerTrusted (javaChain, authType, _request.RequestUri.Host); } catch (JavaCertificateException) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors; }