-
Notifications
You must be signed in to change notification settings - Fork 30
Certificates
Endi S. Dewata edited this page Jul 29, 2022
·
1 revision
cm.findCertByNickname(); cm.findCertsByNickname(); cm.getCACerts(); cm.getPermCerts();
To import a chain of CA certificates (none of which is a user certificate):
CryptoManager manager = CryptoManager.getInstance(); manager.importCACertPackage(bytes);
The nicknames will be automatically generated based on the Subject DN.
To import a chain of CA certificates where the leaf certificate is also a user certificate:
CryptoManager manager = CryptoManager.getInstance(); manager.importUserCACertPackage(bytes, nickname);
To import a chain of certificates where the leaf certificate is a user certificate:
CryptoManager manager = CryptoManager.getInstance(); manager.importCertPackage(bytes, nickname);
To import SSL certificate into NSS database:
public class Main implements SSLCertificateApprovalCallback { public boolean approve(X509Certificate cert, ValidityStatus status) { CryptoManager cm = CryptoManager.getInstance(); cm.importCertToPerm(cert, nickname); } }