-
Notifications
You must be signed in to change notification settings - Fork 30
CryptoManager
Endi S. Dewata edited this page Jul 29, 2022
·
1 revision
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);