| Constructor and Description |
|---|
KeyStoreUtil() |
| Modifier and Type | Method and Description |
|---|---|
static KeyStore |
createEmptyKeyStore(String keyStoreType,
String provider)
Creates and initializes an empty KeyStore using the specified keyStoreType.
|
static KeyStore |
createRootCertificateKeyStore(String keyStoreType,
X509Certificate certificate,
String privateKeyAlias,
PrivateKey privateKey,
String privateKeyPassword,
String provider)
Creates a new KeyStore containing the specified root certificate and private key.
|
static KeyManager[] |
getKeyManagers(KeyStore keyStore,
String keyStorePassword,
String keyManagerAlgorithm,
String provider)
Retrieve the KeyManagers for the specified KeyStore.
|
public static KeyStore createEmptyKeyStore(String keyStoreType, String provider)
keyStoreType - type of key store to initialize, or null to use the system defaultprovider - JCA provider to use, or null to use the system defaultpublic static KeyStore createRootCertificateKeyStore(String keyStoreType, X509Certificate certificate, String privateKeyAlias, PrivateKey privateKey, String privateKeyPassword, String provider)
keyStoreType - type of the generated KeyStore, such as PKCS12 or JKScertificate - root certificate to add to the KeyStoreprivateKeyAlias - alias for the private key in the KeyStoreprivateKey - private key to add to the KeyStoreprivateKeyPassword - password for the private keyprovider - JCA provider to use, or null to use the system defaultpublic static KeyManager[] getKeyManagers(KeyStore keyStore, String keyStorePassword, String keyManagerAlgorithm, String provider)
keyStore - the KeyStore to retrieve KeyManagers fromkeyStorePassword - the KeyStore passwordkeyManagerAlgorithm - key manager algorithm to use, or null to use the system defaultprovider - JCA provider to use, or null to use the system defaultCopyright © 2016. All Rights Reserved.