diff --git a/src/ModernHttpClient/Android/OkHttpNetworkHandler.cs b/src/ModernHttpClient/Android/OkHttpNetworkHandler.cs index 6839410..79906ff 100644 --- a/src/ModernHttpClient/Android/OkHttpNetworkHandler.cs +++ b/src/ModernHttpClient/Android/OkHttpNetworkHandler.cs @@ -198,7 +198,7 @@ class HostnameVerifier : Java.Lang.Object, IHostnameVerifier public bool Verify(string hostname, ISSLSession session) { - return verifyServerCertificate(hostname, session) & verifyClientCiphers(hostname, session); + return verifyServerCertificate(hostname, session); } /// @@ -261,22 +261,5 @@ static bool verifyServerCertificate(string hostname, ISSLSession session) // Call the delegate to validate return ServicePointManager.ServerCertificateValidationCallback(hostname, root, chain, errors); } - - /// - /// Verifies client ciphers and is only available in Mono and Xamarin products. - /// - /// true, if client ciphers was verifyed, false otherwise. - /// - /// - static bool verifyClientCiphers(string hostname, ISSLSession session) - { - var callback = ServicePointManager.ClientCipherSuitesCallback; - if (callback == null) return true; - - var protocol = session.Protocol.StartsWith("SSL", StringComparison.InvariantCulture) ? SecurityProtocolType.Ssl3 : SecurityProtocolType.Tls; - var acceptedCiphers = callback(protocol, new[] { session.CipherSuite }); - - return acceptedCiphers.Contains(session.CipherSuite); - } } }