Difference between revisions of "JSS CryptoManager"

From Dogtag
Jump to: navigation, search
m (Edewata moved page JSS Crypto Manager to JSS CryptoManager)
m
 
Line 1: Line 1:
= Initialization =
+
This page has been moved to https://github.com/dogtagpki/jss/wiki/CryptoManager.
 
 
<pre>
 
CryptoManager.initialize(nssDatabasePath);
 
 
 
CryptoManager cm = CryptoManager.getInstance();
 
</pre>
 
 
 
= Certificates =
 
 
 
To import CA cert chain:
 
 
 
<pre>
 
X509Certificate leafCert = cm.importCACertPackage(chain);
 
</pre>
 
 
 
To import user cert chain:
 
 
 
<pre>
 
X509Certificate leafCert = cm.importCertPackage(chain, nickname);
 
</pre>
 
 
 
To import CA and user cert chain:
 
 
 
<pre>
 
X509Certificate leafCert = cm.importUserCACertPackage(chain, nickname);
 
</pre>
 
 
 
= Keys =
 
 
 
To find a private key associated with a cert:
 
 
 
<pre>
 
PrivateKey privateKey = cm.findPrivKeyByCert(cert);
 
</pre>
 
 
 
= References =
 
 
 
* [[JSS API]]
 

Latest revision as of 18:02, 29 July 2022

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