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