CryptoManager - dogtagpki/jss GitHub Wiki
CryptoManager.initialize(nssDatabasePath); CryptoManager cm = CryptoManager.getInstance();
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);
To find a private key associated with a cert:
PrivateKey privateKey = cm.findPrivKeyByCert(cert);