Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 0908b1c

Browse files
committed
Add support for X509Certificate2::Handle on Unix
Many of the tests use Handle != IntPtr.Zero to determine that the certificate object is valid, so support for this particular property early is important for test coverage.
1 parent dc76a2e commit 0908b1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509CertificateReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public AsymmetricAlgorithm PrivateKey
5858

5959
public IntPtr Handle
6060
{
61-
get { return IntPtr.Zero; }
61+
get { return _cert == null ? IntPtr.Zero : _cert.DangerousGetHandle(); }
6262
}
6363

6464
public string Issuer

0 commit comments

Comments
 (0)