X509CertificateStoreGetPrivateKey Method

Gets the private key for the specified certificate.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public AsymmetricKeyParameter? GetPrivateKey(
	X509Certificate certificate
)

Parameters

certificate  X509Certificate
The certificate.

Return Value

AsymmetricKeyParameter
The private key on success; otherwise .

Remarks

Gets the private key for the specified certificate, if it exists.

See Also