The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
RSACertificateExtensions::GetRSAPrivateKey Method (X509Certificate2^)
Gets the RSA private key from the X509Certificate2.
Assembly: System.Core (in System.Core.dll)
public: [ExtensionAttribute] static RSA^ GetRSAPrivateKey( X509Certificate2^ certificate )
Parameters
- certificate
-
Type:
System.Security.Cryptography.X509Certificates::X509Certificate2^
The certificate.
Return Value
Type: System.Security.Cryptography::RSA^The private key, or null if the certificate does not have an RSA private key.
| Exception | Condition |
|---|---|
| ArgumentNullException | certificate is null. |
.NET Framework
Available since 4.6
Available since 4.6
Show: