static KeyStore |
KeyStoreSupporter.convertKeyStore(KeyStore keyStore,
String keyStorePassword,
KeyStoreSupporter.KeyStoreType keyStoreType) |
This method will convert a given keystore with all its entries into another type of keystore.
|
static KeyStore |
KeyStoreSupporter.createEmptyKeyStore(KeyStoreSupporter.KeyStoreType keyStoreType,
String keystorePassword) |
creates an empty keystore
|
static KeyStore |
KeyStoreSupporter.mergeKeyStores(KeyStore keyStore1,
String password1,
KeyStore keyStore2,
String password2,
KeyStoreSupporter.KeyStoreType keyStoreType,
String mergedKeyStoreKeyPassword) |
this method will merge all accessible entries from the given keystores into a single keystore
WARNING:
It might be that keystore1 and 2 may contain different entries under the same alias.
|
static KeyStore |
KeyStoreSupporter.readKeyStore(byte[] keyStoreBytes,
KeyStoreSupporter.KeyStoreType keyStoreType,
String keyStorePassword) |
will read a byte array to a keystore.
|
static KeyStore |
KeyStoreSupporter.readKeyStore(InputStream keyStoreStream,
KeyStoreSupporter.KeyStoreType keyStoreType,
String keyStorePassword) |
will read an input stream to a keystore.
|
static KeyStore |
KeyStoreSupporter.readTruststore(byte[] truststoreBytes,
KeyStoreSupporter.KeyStoreType keyStoreType) |
will read a keystore from the given byte array that can only be used as truststore
|
static KeyStore |
KeyStoreSupporter.readTruststore(byte[] truststoreBytes,
KeyStoreSupporter.KeyStoreType keyStoreType,
String password) |
will read a keystore from the given byte array that can only be used as truststore
|
static KeyStore |
KeyStoreSupporter.readTruststore(InputStream truststoreStream,
KeyStoreSupporter.KeyStoreType keyStoreType) |
will read a keystore from the given inputstream that can only be used as truststore
|
static KeyStore |
KeyStoreSupporter.readTruststore(InputStream truststoreStream,
KeyStoreSupporter.KeyStoreType keyStoreType,
String password) |
will read a keystore from the given inputstream that can only be used as truststore
|
static Provider |
KeyStoreSupporter.selectProvider(KeyStoreSupporter.KeyStoreType keyStoreType) |
this method will make sure that the correct security provider is chosen for the different keystore types.
|
static KeyStore |
KeyStoreSupporter.toKeyStore(byte[] privateKeyBytes,
byte[] certificateBytes,
String alias,
String keystorePassword,
KeyStoreSupporter.KeyStoreType keyStoreType) |
creates a keystore from the given privateKey and the certificate
|
static KeyStore |
KeyStoreSupporter.toKeyStore(Certificate certificate,
String alias,
String keystorePassword,
KeyStoreSupporter.KeyStoreType keyStoreType) |
creates a keystore from the given certificate
|
static KeyStore |
KeyStoreSupporter.toKeyStore(PrivateKey privateKey,
Certificate certificate,
String alias,
String keystorePassword,
KeyStoreSupporter.KeyStoreType keyStoreType) |
creates a keystore from the given privateKey and the certificate
|
static void |
KeyStoreSupporter.tryCopyEntry(KeyStore keyStore,
String keyStorePassword,
String keyPassword,
KeyStoreSupporter.KeyStoreType keyStoreType,
KeyStore newKeyStore,
String alias) |
this method tries to access an entry of the given keyStore and will add it to the
newKeyStore object no matter if the given alias is a key-entry or a certificate entry
|