Package net.sf.jstuff.core.security
Class KeyTool
java.lang.Object
net.sf.jstuff.core.security.KeyTool
Allows programmatic execution of the KeyTool on Oracle and IBM JVMs.
During execution this class tries to install a custom security manager to prevent JVM exist calls by the underlying KeyTool class
implementation.
- Author:
- Sebastian Thomschke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tuple2<X509Certificate,
PrivateKey> createSelfSignedCertificate
(String subjectDN, String keyAlgo, int keySize, int daysValid) static void
static String
-
Constructor Details
-
KeyTool
public KeyTool()
-
-
Method Details
-
createSelfSignedCertificate
public static Tuple2<X509Certificate,PrivateKey> createSelfSignedCertificate(String subjectDN, String keyAlgo, int keySize, int daysValid) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
main
- Throws:
IOException
-
run
- Throws:
IOException
-