static MSI.MonoTlsProvider CreateDefaultProviderImpl()
        {
            MSI.MonoTlsProvider provider = null;
            var type = Environment.GetEnvironmentVariable("XA_TLS_PROVIDER");

            switch (type)
            {
            case null:
            case "default":
            case "legacy":
                return(new Private.MonoLegacyTlsProvider());

            case "btls":
#if HAVE_BTLS
                if (!MonoBtlsProvider.IsSupported())
                {
                    throw new NotSupportedException("BTLS in not supported!");
                }
                return(new MonoBtlsProvider());
#else
                throw new NotSupportedException("BTLS in not supported!");
#endif
            default:
                throw new NotSupportedException(string.Format("Invalid TLS Provider: `{0}'.", provider));
            }
        }
예제 #2
0
 public static string GetSystemStoreLocation()
 {
     return(MonoBtlsProvider.GetSystemStoreLocation());
 }
예제 #3
0
 public static X509Chain CreateChain()
 {
     return(MonoBtlsProvider.CreateChain());
 }
예제 #4
0
 public static X509Certificate2 CreateCertificate2(byte[] data, string password, bool disallowFallback = false)
 {
     return(MonoBtlsProvider.CreateCertificate(data, password));
 }
예제 #5
0
 public static X509Certificate2 CreateCertificate2(byte[] data, BtlsX509Format format, bool disallowFallback = false)
 {
     return(MonoBtlsProvider.CreateCertificate(data, (MonoBtlsX509Format)format));
 }
예제 #6
0
 public static X509Chain GetManagedChain(BtlsX509Chain chain)
 {
     return(MonoBtlsProvider.GetManagedChain(chain.Instance));
 }
예제 #7
0
 public static bool IsSupported()
 {
     return(MonoBtlsProvider.IsSupported());
 }