Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -22,7 +22,7 @@ namespace System.Net {
using Microsoft.Win32;
// This turned to be a legacy type name that is simply forwarded to System.Security.Authentication.SslProtocols defined values.
#if !FEATURE_PAL
#if !MONO && !FEATURE_PAL
[Flags]
public enum SecurityProtocolType
{
@@ -121,7 +121,7 @@ namespace System.Net {
internal bool result;
}
}
#elif MONO || !FEATURE_PAL
internal class ServerCertValidationCallback
{
readonly RemoteCertificateValidationCallback m_ValidationCallback;
@@ -190,6 +190,7 @@ namespace System.Net {
}
#endif // !FEATURE_PAL
#if MONO_FEATURE_WEB_STACK
//
// The ServicePointManager class hands out ServicePoints (may exist or be created
// as needed) and makes sure they are garbage collected when they expire.
@@ -1073,4 +1074,5 @@ namespace System.Net {
GlobalLog.Leave("ServicePointManager::SetTcpKeepAlive()");
}
}
#endif
}

View File

@@ -1296,13 +1296,6 @@ namespace System.Net.Security {
// we don't catch exceptions in this method, so it's safe for "accepted" be initialized with true
bool success = false;
#if MONO
if (IsServer)
// FIXME
success = true;
else
success = SSPIWrapper.CheckRemoteCertificate(m_SecurityContext);
#else
X509Chain chain = null;
X509Certificate2 remoteCertificateEx = null;
@@ -1316,6 +1309,7 @@ namespace System.Net.Security {
GlobalLog.Leave("SecureChannel#" + ValidationHelper.HashString(this) + "::VerifyRemoteCertificate (no remote cert)", (!m_RemoteCertRequired).ToString());
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable;
}
#if !MONO
else
{
chain = new X509Chain();
@@ -1368,6 +1362,9 @@ namespace System.Net.Security {
else
success = (sslPolicyErrors == SslPolicyErrors.None);
}
#else
success = SSPIWrapper.CheckRemoteCertificate(m_SecurityContext);
#endif
if (Logging.On) {
if (sslPolicyErrors != SslPolicyErrors.None)
@@ -1406,7 +1403,6 @@ namespace System.Net.Security {
remoteCertificateEx.Reset();
}
GlobalLog.Leave("SecureChannel#" + ValidationHelper.HashString(this) + "::VerifyRemoteCertificate", success.ToString());
#endif
return success;
}