Skip to content

Commit e4e866a

Browse files
committed
revert unneeded change
1 parent 6450c19 commit e4e866a

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,8 @@ internal static SslPolicyErrors VerifyCertificateProperties(
3535
return null;
3636
}
3737

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-
4838
X509Certificate2? result = null;
49-
39+
IntPtr remoteCertificate = Interop.OpenSsl.GetPeerCertificate((SafeSslHandle)securityContext);
5040
try
5141
{
5242
if (remoteCertificate == IntPtr.Zero)

0 commit comments

Comments
 (0)