Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -105,7 +105,7 @@ namespace Mono.Net.Security
internal static HttpWebRequest CreateHttpsRequest (Uri requestUri, object provider, object settings)
{
#if SECURITY_DEP
return MonoTlsProviderFactory.CreateHttpsRequest (requestUri, (MSI.MonoTlsProvider)provider, (MSI.MonoTlsSettings)settings);
return new HttpWebRequest (requestUri, (MSI.MonoTlsProvider)provider, (MSI.MonoTlsSettings)settings);
#else
throw new NotSupportedException ();
#endif
@ -114,7 +114,7 @@ namespace Mono.Net.Security
internal static object CreateHttpListener (object certificate, object provider, object settings)
{
#if SECURITY_DEP
return MonoTlsProviderFactory.CreateHttpListener ((X509Certificate)certificate, (MSI.MonoTlsProvider)provider, (MSI.MonoTlsSettings)settings);
return new HttpListener ((X509Certificate)certificate, (MSI.MonoTlsProvider)provider, (MSI.MonoTlsSettings)settings);
#else
throw new NotSupportedException ();
#endif
@ -129,6 +129,15 @@ namespace Mono.Net.Security
#endif
}
internal static object GetMonoSslStream (HttpListenerContext context)
{
#if SECURITY_DEP
return context.Connection.SslStream?.Impl;
#else
throw new NotSupportedException ();
#endif
}
internal static bool IsProviderSupported (string name)
{
#if SECURITY_DEP