CryptoManager - dogtagpki/jss GitHub Wiki

Initialization

CryptoManager.initialize(nssDatabasePath);

CryptoManager cm = CryptoManager.getInstance();

Certificates

To import CA cert chain:

X509Certificate leafCert = cm.importCACertPackage(chain);

To import user cert chain:

X509Certificate leafCert = cm.importCertPackage(chain, nickname);

To import CA and user cert chain:

X509Certificate leafCert = cm.importUserCACertPackage(chain, nickname);

Keys

To find a private key associated with a cert:

PrivateKey privateKey = cm.findPrivKeyByCert(cert);
⚠️ **GitHub.com Fallback** ⚠️