$Crypto.ListCertificates

Overview

Lists all certificates matching given context

Array<Certificate> $Crypto.ListCertificates(cert: CertificateContext)

Arguments

CertificateContext cert

Certificate context to find certificates

Returns

Array of certificates found

Remarks

If no certificate found, empty array is returned.

Throws error exception if PKCS11 library or PFX file is not found or failed to load.

Example

List certificates from PFX file

var certificates = $Crypto.ListCertificates('base64 encoded pfx content', 'password');

Example

List certificates from PKCS11 library

var certificates = $Crypto.ListCertificates({ Filter: { CommonName: 'The Name' // SerialNumber : '1234' }, Pin: '1111', Library: '<path to PKCS11 library>' });

Copyright © 2010 - 2023 Emakin. All rights reserved.