Bagikan melalui


CertUtils.LoadCertificateByThumbprint(String, Boolean) Method

Definition

Loads the certificate given its thumbprint.

public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificateByThumbprint (string thumbprint, bool requirePrivateKey);
static member LoadCertificateByThumbprint : string * bool -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificateByThumbprint (thumbprint As String, requirePrivateKey As Boolean) As X509Certificate2

Parameters

thumbprint
String

the thumbrint of the certificate.

requirePrivateKey
Boolean

An indication if a private key is required.

Returns

If loaded successfully, the X509Certificate2 object representing the certificate; otherwise, a null reference (Nothing in Visual Basic).

Applies to