GetCertificate¶
Finds a certificate based on the given context.
1 | |
The common name of the certificate.
SerialNumber : string
The serial number of the certificate.
Logout() : void
Logs out from the PKCS11 device.
TryLogin(pin: string) : string
Tries to log in to the PKCS11 device with the given PIN.
Loads a certificate from PFX content.
1 | |
The common name of the certificate.
SerialNumber : string
The serial number of the certificate.
Logout() : void
Logs out from the PKCS11 device.
TryLogin(pin: string) : string
Tries to log in to the PKCS11 device with the given PIN.
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 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 | |