public class KeyStoreUtil
extends java.lang.Object
KeyStores.| Constructor and Description |
|---|
KeyStoreUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.security.KeyStore |
createEmptyKeyStore(java.lang.String keyStoreType,
java.lang.String provider)
Creates and initializes an empty KeyStore using the specified keyStoreType.
|
static java.security.KeyStore |
createRootCertificateKeyStore(java.lang.String keyStoreType,
java.security.cert.X509Certificate certificate,
java.lang.String privateKeyAlias,
java.security.PrivateKey privateKey,
java.lang.String privateKeyPassword,
java.lang.String provider)
Creates a new KeyStore containing the specified root certificate and private key.
|
static javax.net.ssl.KeyManager[] |
getKeyManagers(java.security.KeyStore keyStore,
java.lang.String keyStorePassword,
java.lang.String keyManagerAlgorithm,
java.lang.String provider)
Retrieve the KeyManagers for the specified KeyStore.
|
public static java.security.KeyStore createEmptyKeyStore(java.lang.String keyStoreType,
java.lang.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 java.security.KeyStore createRootCertificateKeyStore(java.lang.String keyStoreType,
java.security.cert.X509Certificate certificate,
java.lang.String privateKeyAlias,
java.security.PrivateKey privateKey,
java.lang.String privateKeyPassword,
java.lang.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 javax.net.ssl.KeyManager[] getKeyManagers(java.security.KeyStore keyStore,
java.lang.String keyStorePassword,
java.lang.String keyManagerAlgorithm,
java.lang.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 default