Imported Upstream version 5.8.0.22

Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-10-19 20:04:20 +00:00
parent 5f4a27cc8a
commit 7d05485754
5020 changed files with 114082 additions and 186061 deletions

View File

@ -38,6 +38,7 @@ using System.Security.Cryptography.X509Certificates;
using System;
using System.Net;
using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@ -192,6 +193,22 @@ namespace Mono.Net.Security
}
}
static bool enableDebug;
[Conditional ("MONO_TLS_DEBUG")]
static void InitializeDebug ()
{
if (Environment.GetEnvironmentVariable ("MONO_TLS_DEBUG") != null)
enableDebug = true;
}
[Conditional ("MONO_TLS_DEBUG")]
internal static void Debug (string message, params object[] args)
{
if (enableDebug)
Console.Error.WriteLine (message, args);
}
#endregion
internal static readonly Guid AppleTlsId = new Guid ("981af8af-a3a3-419a-9f01-a518e3a17c1c");
@ -203,6 +220,9 @@ namespace Mono.Net.Security
lock (locker) {
if (providerRegistration != null)
return;
InitializeDebug ();
providerRegistration = new Dictionary<string,Tuple<Guid,string>> ();
providerCache = new Dictionary<Guid,MSI.MonoTlsProvider> ();