You've already forked linux-packaging-mono
Imported Upstream version 4.4.0.40
Former-commit-id: 6427cc082e74df30afc535fd906a3494b74b0817
This commit is contained in:
@ -160,7 +160,7 @@ namespace Mono.Net.Security
|
||||
certValidationCallback = new ServerCertValidationCallback (callback);
|
||||
}
|
||||
certSelectionCallback = Private.CallbackHelpers.MonoToInternal (settings.ClientCertificateSelectionCallback);
|
||||
fallbackToSPM = settings.UseServicePointManagerCallback;
|
||||
fallbackToSPM = settings.UseServicePointManagerCallback ?? stream != null;
|
||||
}
|
||||
|
||||
if (stream != null) {
|
||||
@ -264,7 +264,7 @@ namespace Mono.Net.Security
|
||||
leaf = certs [0];
|
||||
|
||||
if (tlsStream != null)
|
||||
request.ServicePoint.SetServerCertificate (leaf);
|
||||
request.ServicePoint.UpdateServerCertificate (leaf);
|
||||
|
||||
if (leaf == null) {
|
||||
errors |= SslPolicyErrors.RemoteCertificateNotAvailable;
|
||||
|
@ -109,13 +109,19 @@ namespace Mono.Net.Security
|
||||
ServicePointManager.CheckCertificateRevocationList);
|
||||
|
||||
status = WebExceptionStatus.Success;
|
||||
} catch (Exception ex) {
|
||||
status = WebExceptionStatus.SecureChannelFailure;
|
||||
throw;
|
||||
} finally {
|
||||
if (CertificateValidationFailed)
|
||||
status = WebExceptionStatus.TrustFailure;
|
||||
|
||||
request.ServicePoint.SetClientCertificate (sslStream.InternalLocalCertificate);
|
||||
if (status != WebExceptionStatus.Success)
|
||||
if (status == WebExceptionStatus.Success)
|
||||
request.ServicePoint.UpdateClientCertificate (sslStream.InternalLocalCertificate);
|
||||
else {
|
||||
request.ServicePoint.UpdateClientCertificate (null);
|
||||
sslStream = null;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user