Imported Upstream version 4.8.0.459

Former-commit-id: 2a5b9df2014f72665850c7f885e7aed54704a53a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-01-19 14:22:10 +00:00
parent a355c1b831
commit e5cd25ff4f
725 changed files with 1215 additions and 107650 deletions

View File

@@ -23,6 +23,7 @@ using System.IO;
using System.Net;
using System.Net.Security;
using System.Globalization;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Security.Cryptography.X509Certificates;
@@ -214,7 +215,7 @@ namespace Mono.Net.Security
try {
asyncRequest.StartOperation (ProcessHandshake);
} catch (Exception ex) {
throw SetException (ex);
ExceptionDispatchInfo.Capture (SetException (ex)).Throw ();
}
} finally {
if (lazyResult == null || lastException != null) {
@@ -241,7 +242,7 @@ namespace Mono.Net.Security
var e = lazyResult.Result as Exception;
if (e != null)
throw SetException (e);
ExceptionDispatchInfo.Capture (SetException (e)).Throw ();
}
internal void ValidateCreateContext (bool serverMode, string targetHost, SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool clientCertRequired)