1 // Copyright 2015 Xamarin Inc. All rights reserved.
4 #if MONO_SECURITY_ALIAS
5 extern alias MonoSecurity;
6 using MSI = MonoSecurity::Mono.Security.Interface;
8 using MSI = Mono.Security.Interface;
17 namespace Mono.Net.Security
19 static partial class MonoTlsProviderFactory
21 static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
23 MSI.MonoTlsProvider provider = null;
24 var type = Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER");
29 return new LegacyTlsProvider ();
32 if (!IsBtlsSupported ())
33 throw new NotSupportedException ("BTLS in not supported!");
34 return new MonoBtlsProvider ();
37 throw new NotSupportedException (string.Format ("Invalid TLS Provider: `{0}'.", provider));