...
Certificate $Crypto.GetCertificate(cert: CertificateContext)
...
Array<Certificate> $Crypto.GetCertificate(cert: string, password: string)
...
Throws error exception if PKCS11 library or PFX file is not found or failed to load.
Example
Find a certificates from list
Code Block | ||
---|---|---|
| ||
var cert = $Crypto.GetCertificate({
Filter: {
CommonName: 'The Name'
// SerialNumber : '1234'
}
}); |
Example
Load certificate from PKCS11 library
Code Block | ||
---|---|---|
| ||
var cert = $Crypto.GetCertificate({ Filter: { CommonName: 'The Name' // SerialNumber : '1234' }, Pin: '1111', Library: '<path to PKCS11 library>' }); |
Example
Load certificate from PFX file
Code Block | ||
---|---|---|
| ||
var cert = $Crypto.GetCertificate('base64 encoded pfx content', 'password'); |