1 // Copyright 2015 Xamarin Inc. All rights reserved.
4 using MSI = Mono.Security.Interface;
9 namespace Mono.Net.Security
11 static partial class MonoTlsProviderFactory
13 static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
15 MSI.MonoTlsProvider provider = null;
16 var type = Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER");
21 return new LegacyTlsProvider ();
24 if (!MonoBtlsProvider.IsSupported ())
25 throw new NotSupportedException ("BTLS in not supported!");
26 return new MonoBtlsProvider ();
28 throw new NotSupportedException ("BTLS in not supported!");
31 throw new NotSupportedException (string.Format ("Invalid TLS Provider: `{0}'.", provider));