 | X509Certificate2ExtensionsGetPrivateKeyAsAsymmetricKeyParameter Method |
Get the certificate's private key as a BouncyCastle AsymmetricKeyParameter, if available.
Namespace: MimeKit.CryptographyAssembly: MimeKit (in MimeKit.dll) Version: 4.17.0
Syntaxpublic static AsymmetricKeyParameter? GetPrivateKeyAsAsymmetricKeyParameter(
this X509Certificate2 certificate
)
Parameters
- certificate X509Certificate2
- The X.509 certificate.
Return Value
AsymmetricKeyParameterThe asymmetric key parameter for the certificate's private key, if available; otherwise,
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions
Remarks
Gets the certificate's private key as a BouncyCastle AsymmetricKeyParameter, if available.
See Also