GetCertificate¶
Finds a certificate based on the given context.
1 |
|
Loads a certificate from PFX content.
1 |
|
Parameters¶
CertificateContext cert
The certificate context to use when searching for the certificate.
string password
The password of the PFX content.
Returns¶
The certificate if found; otherwise, null. The certificate found in the PFX content.
Remarks¶
If multiple certificates are found, the first one is returned.
If no certificate is found, null is returned.
An error exception is thrown if the PKCS11 library or PFX file is not found or fails to load.
Finding a certificate from a list:¶
1 2 3 4 5 6 |
|
Loading a certificate from a PKCS11 library:¶
1 2 3 4 5 6 7 8 |
|
Load a certificate from a PFX file:¶
1 |
|
Types¶
Certificate¶
CommonName
: string
The common name of the certificate.
SerialNumber
: string
The serial number of the certificate.