提交 242120ab 编写于 作者: S Stephen Toub

Merge pull request dotnet/corefx#9131 from stephentoub/fix_clientcert_crash

Fix crash in HttpClient on Unix when using client certificates

Commit migrated from https://github.com/dotnet/corefx/commit/30eee0b348e6a2ed1c3c40f94c2b5d53e769b274
......@@ -108,8 +108,10 @@ private int TlsClientCertCallback(IntPtr ssl, out IntPtr certHandle, out IntPtr
if (!Interop.Ssl.SslAddExtraChainCert(sslHandle, dupCertHandle))
{
EventSourceTrace("Failed to add extra chain certificate");
dupCertHandle.Dispose(); // we still own the safe handle; clean it up
return SuspendHandshake;
}
dupCertHandle.SetHandleAsInvalid(); // ownership has been transferred to sslHandle; do not free via this safe handle
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册