Otherwise we'd be regressing existing (and working) behavior.
NO_MONO_SECURITY=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
NO_MONO_SECURITY=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
+MONO_FEATURE_APPLE_X509=1
NO_MONO_SECURITY=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
NO_MONO_SECURITY=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
+MONO_FEATURE_APPLE_X509=1
-#if MONO_FEATURE_APPLETLS
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
using System;
using System.Runtime.InteropServices;
using System;
using System.Runtime.InteropServices;
LIB_MCS_FLAGS += -d:ONLY_APPLETLS
endif
LIB_MCS_FLAGS += -d:ONLY_APPLETLS
endif
+ifdef MONO_FEATURE_APPLE_X509
+LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLE_X509
+endif
+
WARNING_ABOUT_DISABLED_WARNING=1635
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
DEFAULT_REFERENCES =
WARNING_ABOUT_DISABLED_WARNING=1635
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
DEFAULT_REFERENCES =
-#if MONO_FEATURE_APPLETLS
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
using System;
using System.Text;
using System.Runtime.InteropServices;
using System;
using System.Text;
using System.Runtime.InteropServices;
-#if MONO_FEATURE_APPLETLS
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
using System;
using System.Runtime.InteropServices;
using MX = Mono.Security.X509;
using System;
using System.Runtime.InteropServices;
using MX = Mono.Security.X509;
public static X509CertificateImpl InitFromHandle (IntPtr handle)
{
public static X509CertificateImpl InitFromHandle (IntPtr handle)
{
-#if MONO_FEATURE_APPLETLS && ONLY_APPLETLS // ONLY_APPLETLS should not support any other option
+#if (MONO_FEATURE_APPLETLS && ONLY_APPLETLS) || MONO_FEATURE_APPLE_X509 // ONLY_APPLETLS should not support any other option
return InitFromHandleApple (handle);
return InitFromHandleApple (handle);
-#elif MONOTOUCH_WATCH
- throw new PlatformNotSupportedException ();
#else
#if MONO_FEATURE_APPLETLS // If we support AppleTls, which is the default, and not overriding to legacy
#else
#if MONO_FEATURE_APPLETLS // If we support AppleTls, which is the default, and not overriding to legacy
static X509CertificateImpl Import (byte[] rawData)
{
static X509CertificateImpl Import (byte[] rawData)
{
-#if MONO_FEATURE_APPLETLS && ONLY_APPLETLS // ONLY_APPLETLS should not support any other option
+#if (MONO_FEATURE_APPLETLS && ONLY_APPLETLS) || MONO_FEATURE_APPLE_X509 // ONLY_APPLETLS should not support any other option
return ImportApple (rawData);
return ImportApple (rawData);
-#elif MONOTOUCH_WATCH
- throw new PlatformNotSupportedException ();
#else
#if MONO_FEATURE_APPLETLS
if (ShouldUseAppleTls)
#else
#if MONO_FEATURE_APPLETLS
if (ShouldUseAppleTls)