From 0b045d2b6e5d2afdbdc4ebb29ab4eb6095028f0d Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 30 Sep 2016 16:24:38 +0200 Subject: [PATCH] [System]: Enable AndroidPlatform.CertStoreLookup(). Uses reflection to call into AndroidEnvironment.CertStoreLookup() (which as been added in https://github.com/xamarin/xamarin-android/pull/246). --- mcs/class/System/System/AndroidPlatform.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mcs/class/System/System/AndroidPlatform.cs b/mcs/class/System/System/AndroidPlatform.cs index 2e57ca299a7..5d59fa64718 100644 --- a/mcs/class/System/System/AndroidPlatform.cs +++ b/mcs/class/System/System/AndroidPlatform.cs @@ -44,9 +44,7 @@ namespace System { #if SECURITY_DEP static readonly Converter, bool> trustEvaluateSsl; -#if HAVE_BTLS static readonly Func certStoreLookup; -#endif #endif // SECURITY_DEP static readonly Func getDefaultProxy; static readonly GetInterfaceAddressesDelegate getInterfaceAddresses; @@ -62,14 +60,12 @@ namespace System { "TrustEvaluateSsl", ignoreCase:false, throwOnBindFailure:true); -#if HAVE_BTLS certStoreLookup = (Func) Delegate.CreateDelegate (typeof (Func), t, "CertStoreLookup", ignoreCase:false, throwOnBindFailure:true); -#endif #endif // SECURITY_DEP getDefaultProxy = (Func)Delegate.CreateDelegate ( typeof (Func), t, "GetDefaultProxy", @@ -98,7 +94,6 @@ namespace System { internal static MonoBtlsX509 CertStoreLookup (MonoBtlsX509Name name) { -#if HAVE_BTLS var hash = name.GetHash (); var hashOld = name.GetHashOld (); var result = certStoreLookup (hash, false); @@ -113,9 +108,6 @@ namespace System { return null; return MonoBtlsX509.LoadFromData (result, MonoBtlsX509Format.DER); -#else - return null; -#endif } #endif // SECURITY_DEP -- 2.25.1