Difference between revisions of "JSS Certificate API"

From Dogtag
Jump to: navigation, search
(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...")
 
m (Replaced content with "This page has been moved to https://github.com/dogtagpki/jss/wiki/Certificates.")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Importing CA certificate =
+
This page has been moved to https://github.com/dogtagpki/jss/wiki/Certificates.
 
 
To import a chain of CA certificates (none of which is a user certificate):
 
 
 
<pre>
 
CryptoManager manager = CryptoManager.getInstance();
 
manager.importCACertPackage(bytes);
 
</pre>
 
 
 
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:
 
 
 
<pre>
 
CryptoManager manager = CryptoManager.getInstance();
 
manager.importUserCACertPackage(bytes, nickname);
 
</pre>
 
 
 
= Importing user certificate =
 
 
 
To import a chain of certificates where the leaf certificate is a user certificate:
 
 
 
<pre>
 
CryptoManager manager = CryptoManager.getInstance();
 
manager.importCertPackage(bytes, nickname);
 
</pre>
 
 
 
= Importing SSL certificate into NSS database =
 
 
 
To import SSL certificate into NSS database:
 
 
 
<pre>
 
public class Main implements SSLCertificateApprovalCallback {
 
 
 
    public boolean approve(X509Certificate cert, ValidityStatus status) {
 
 
 
        CryptoManager cm = CryptoManager.getInstance();
 
        cm.importCertToPerm(cert, nickname);
 
    }
 
}
 
</pre>
 
 
 
= References =
 
 
 
* [[JSS API]]
 

Latest revision as of 18:20, 29 July 2022

This page has been moved to https://github.com/dogtagpki/jss/wiki/Certificates.