JSS Certificate API

From Dogtag
Revision as of 20:28, 5 June 2018 by Edewata (talk | contribs) (Created page with "= Importing CA certificate = To import a chain of CA certificates (none of which is a user certificate): <pre> CryptoManager manager = CryptoManager.getInstance(); manager.i...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Importing CA certificate

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.

Importing user CA certificate

To import a chain of CA certificates where the leaf certificate is also a user certificate:

CryptoManager manager = CryptoManager.getInstance();
manager.importUserCACertPackage(bytes, nickname);

Importing user certificate

To import a chain of certificates where the leaf certificate is a user certificate:

CryptoManager manager = CryptoManager.getInstance();
manager.importCertPackage(bytes, nickname);

Importing SSL certificate into NSS database

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);
    }
}

References