diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-25 19:44:33 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-25 19:44:33 +0300 |
commit | db21455da9d74354b75accafc4e8e3c21466f048 (patch) | |
tree | f4b6c3dd470f67532aa876c22330e8d3c6162313 /mcs/class/System/System.Security.Cryptography.X509Certificates | |
parent | 118e75023aae9ba9933b61c302b53398f1b815c9 (diff) |
[System] Don't build managed BTLS code on monotouch
After 2fb07d6c6d5b3915ef4665391febbb7b8be09fb5 BTLS can be used as a shared lib,
but this caused an issue in some monotouch tools which grepped the P/Invokes for `__Internal`
since these icalls wouldn't resolve on monotouch since BTLS is disabled there.
Instead, we now completely leave out building the managed parts of BTLS when
BTLS is not enabled.
Diffstat (limited to 'mcs/class/System/System.Security.Cryptography.X509Certificates')
-rw-r--r-- | mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.cs index 9bbe99f8631..7d0b3d1487c 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.cs @@ -35,13 +35,13 @@ extern alias MonoSecurity; using MonoSecurity::Mono.Security.Interface; using MX = MonoSecurity::Mono.Security.X509; #else -#if !FEATURE_NO_BSD_SOCKETS +#if MONO_FEATURE_BTLS using Mono.Security.Interface; #endif using MX = Mono.Security.X509; #endif -#if !FEATURE_NO_BSD_SOCKETS +#if MONO_FEATURE_BTLS using Mono.Btls; #endif #endif @@ -94,7 +94,7 @@ namespace System.Security.Cryptography.X509Certificates X509Helper.ThrowIfContextInvalid (impl); } -#if FEATURE_NO_BSD_SOCKETS +#if !MONO_FEATURE_BTLS static X509Certificate GetNativeInstance (X509CertificateImpl impl) { throw new PlatformNotSupportedException (); @@ -122,11 +122,11 @@ namespace System.Security.Cryptography.X509Certificates x509.ExportAsPEM (bio, includeHumanReadableForm); } } -#endif // !FEATURE_NO_BSD_SOCKETS +#endif // !MONO_FEATURE_BTLS internal static X509Certificate2Impl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags, bool disableProvider = false) { -#if !FEATURE_NO_BSD_SOCKETS +#if MONO_FEATURE_BTLS if (!disableProvider) { var provider = MonoTlsProviderFactory.GetProvider (); if (provider.HasNativeCertificates) { @@ -134,7 +134,7 @@ namespace System.Security.Cryptography.X509Certificates return impl; } } -#endif // FEATURE_NO_BSD_SOCKETS +#endif // MONO_FEATURE_BTLS var impl2 = new X509Certificate2ImplMono (); impl2.Import (rawData, password, keyStorageFlags); return impl2; @@ -142,7 +142,7 @@ namespace System.Security.Cryptography.X509Certificates internal static X509Certificate2Impl Import (X509Certificate cert, bool disableProvider = false) { -#if !FEATURE_NO_BSD_SOCKETS +#if MONO_FEATURE_BTLS if (!disableProvider) { var provider = MonoTlsProviderFactory.GetProvider (); if (provider.HasNativeCertificates) { @@ -150,7 +150,7 @@ namespace System.Security.Cryptography.X509Certificates return impl; } } -#endif // FEATURE_NO_BSD_SOCKETS +#endif // MONO_FEATURE_BTLS var impl2 = cert.Impl as X509Certificate2Impl; if (impl2 != null) return (X509Certificate2Impl)impl2.Clone (); |