|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jorphan.exec.KeyToolUtils
public class KeyToolUtils
Utilities for working with Java keytool
Field Summary | |
---|---|
static String |
ROOT_CACERT_CRT_PFX
|
static boolean |
SUPPORTS_HOST_CERT
Does this class support generation of host certificates? |
Method Summary | |
---|---|
static void |
generateHostCert(File keystore,
String password,
String host,
int validity)
Create a host certificate signed with the CA certificate. |
static void |
generateProxyCA(File keystore,
String password,
int validity)
Creates a self-signed Root CA certificate and an intermediate CA certificate (signed by the Root CA certificate) that can be used to sign server certificates. |
static void |
genkeypair(File keystore,
String alias,
String password,
int validity,
String dname,
String ext)
Generate a self-signed keypair using the algorithm "RSA". |
static String[] |
getCAaliases()
Returns a list of the CA aliases that should be in the keystore. |
static String |
getRootCAalias()
Get the root CA alias; needed to check the serial number and fingerprint |
static boolean |
haveKeytool()
|
static String |
list(File keystore,
String storePass)
List the contents of a keystore |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ROOT_CACERT_CRT_PFX
public static final boolean SUPPORTS_HOST_CERT
Method Detail |
---|
public static void genkeypair(File keystore, String alias, String password, int validity, String dname, String ext) throws IOException
keystore
- the keystore; if it already contains the alias the command will failalias
- the alias to use, not nullpassword
- the password to use for the store and the keyvalidity
- the validity period in days, greater than 0dname
- the dname value, if omitted use "cn=JMeter Proxy (DO NOT TRUST)"ext
- if not null, the extension (-ext) to add (e.g. "bc:c"). This requires Java 7.
IOException
public static void generateProxyCA(File keystore, String password, int validity) throws IOException
keystore
- the keystore in which to store everythingpassword
- the password for keystore and keysvalidity
- the validity period in days, must be greater than 0
IOException
public static void generateHostCert(File keystore, String password, String host, int validity) throws IOException
keystore
- the keystore to usepassword
- the password to use for the keystore and keyshost
- the host, e.g. jmeter.apache.org or *.apache.org; also used as the aliasvalidity
- the validity period for the generated keypair
IOException
public static String list(File keystore, String storePass) throws IOException
keystore
- the keystore filestorePass
- the keystore password
IOException
public static String[] getCAaliases()
public static String getRootCAalias()
public static boolean haveKeytool()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |