We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6450c19 commit e4e866aCopy full SHA for e4e866a
src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs
@@ -35,18 +35,8 @@ internal static SslPolicyErrors VerifyCertificateProperties(
35
return null;
36
}
37
38
- IntPtr remoteCertificate = IntPtr.Zero;
39
- {
40
- using var chainStack = Interop.OpenSsl.GetPeerCertificateChain((SafeSslHandle)securityContext);
41
- int count = Interop.Crypto.GetX509StackFieldCount(chainStack);
42
- if (count > 0)
43
44
- remoteCertificate = Interop.Crypto.GetX509StackField(chainStack, 0);
45
- }
46
47
-
48
X509Certificate2? result = null;
49
+ IntPtr remoteCertificate = Interop.OpenSsl.GetPeerCertificate((SafeSslHandle)securityContext);
50
try
51
{
52
if (remoteCertificate == IntPtr.Zero)
0 commit comments