CertUtils.LoadCertificateByThumbprint(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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).