Package net.handle.util
Class X509HSCertificateGenerator
java.lang.Object
net.handle.util.X509HSCertificateGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic X509Certificate
generate
(String handle, int index, PublicKey pubKey, PrivateKey privKey) static X509Certificate
generate
(String handle, PublicKey pubKey, PrivateKey privKey) static X509Certificate
generate
(ValueReference valRef, PublicKey pubKey, PrivateKey privKey) static X509Certificate
generateWithCnAndUid
(String cn, String uid, PublicKey pubKey, PrivateKey privKey) static X509Certificate
generateWithUid
(String uid, PublicKey pubKey, PrivateKey privKey) static X509Certificate
readCertAsPem
(Reader reader) static X509Certificate[]
readCertChainAsPem
(Reader reader) static void
storeCertAndKey
(KeyStore keyStore, Certificate cert, PrivateKey privKey, String alias, String keyPass) static void
writeCertAsPem
(Writer writer, Certificate cert)
-
Constructor Details
-
X509HSCertificateGenerator
public X509HSCertificateGenerator()
-
-
Method Details
-
generate
public static X509Certificate generate(String handle, PublicKey pubKey, PrivateKey privKey) throws Exception - Throws:
Exception
-
generate
public static X509Certificate generate(String handle, int index, PublicKey pubKey, PrivateKey privKey) throws Exception - Throws:
Exception
-
generate
public static X509Certificate generate(ValueReference valRef, PublicKey pubKey, PrivateKey privKey) throws Exception - Throws:
Exception
-
generateWithUid
public static X509Certificate generateWithUid(String uid, PublicKey pubKey, PrivateKey privKey) throws Exception - Throws:
Exception
-
generateWithCnAndUid
public static X509Certificate generateWithCnAndUid(String cn, String uid, PublicKey pubKey, PrivateKey privKey) throws Exception - Throws:
Exception
-
storeCertAndKey
public static void storeCertAndKey(KeyStore keyStore, Certificate cert, PrivateKey privKey, String alias, String keyPass) throws KeyStoreException - Throws:
KeyStoreException
-
writeCertAsPem
- Throws:
IOException
-
readCertAsPem
- Throws:
IOException
-
readCertChainAsPem
- Throws:
IOException
-