public class KeyStoreService extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
KeyStoreService.PasswordProvider |
static class |
KeyStoreService.PasswordProviderMap |
static class |
KeyStoreService.SimplePasswordProvider |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToKeyStore(KeyStore ks,
KeyEntry keyEntry)
Put the given entry into a key store.
|
static void |
addToKeyStore(KeyStore ks,
SecretKeyEntry secretKeyData) |
static void |
fillKeyStore(KeyStore ks,
Collection<KeyEntry> keyEntries)
Put the given entries into a key store.
|
static List<KeyEntry> |
loadEntries(KeyStore keyStore,
KeyStoreService.PasswordProvider passwordProvider) |
static Map<String,KeyEntry> |
loadEntryMap(KeyStore keyStore,
KeyStoreService.PasswordProvider passwordProvider) |
static KeyStore |
loadKeyStore(byte[] data,
String storeId,
KeyStoreType keyStoreType,
CallbackHandler storePassSrc) |
static KeyStore |
loadKeyStore(InputStream in,
String storeId,
KeyStoreType storeType,
CallbackHandler storePassSrc)
Loads a key store.
|
static KeyStore |
loadKeyStore(KeyStoreType keyStoreType,
KeyStore.LoadStoreParameter loadStoreParameter) |
static KeyStore |
newKeyStore(KeyStoreType keyStoreType)
Create an initializes a new key store.
|
static byte[] |
toByteArray(KeyStore keystore,
String storeId,
CallbackHandler storePassSrc)
Write this key store into a byte array
|
public static KeyStore newKeyStore(KeyStoreType keyStoreType)
keyStoreType - storeTypepublic static byte[] toByteArray(KeyStore keystore, String storeId, CallbackHandler storePassSrc)
keystore - keystorestoreId - storeIdstorePassSrc - storePassSrcpublic static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreType storeType, CallbackHandler storePassSrc)
in - : the inputStream from which to read the keystorestoreId - : The store id. This is passed to the callback handler to identify the requested password record.storeType - : the type of this key store. f null, the defaut java keystore type is used.storePassSrc - : the callback handler that retrieves the store password.public static KeyStore loadKeyStore(KeyStoreType keyStoreType, KeyStore.LoadStoreParameter loadStoreParameter)
public static KeyStore loadKeyStore(byte[] data, String storeId, KeyStoreType keyStoreType, CallbackHandler storePassSrc)
data - : the byte array containing key store data.storeId - : The store id. This is passed to the callback handler to identify the requested password record.keyStoreType - : the type of this key store. f null, the defaut java keystore type is used.storePassSrc - : the callback handler that retrieves the store password.public static void fillKeyStore(KeyStore ks, Collection<KeyEntry> keyEntries)
ks - kskeyEntries - keyEntriespublic static void addToKeyStore(KeyStore ks, KeyEntry keyEntry)
ks - kskeyEntry - keyEntry to be addedpublic static void addToKeyStore(KeyStore ks, SecretKeyEntry secretKeyData)
public static List<KeyEntry> loadEntries(KeyStore keyStore, KeyStoreService.PasswordProvider passwordProvider)
public static Map<String,KeyEntry> loadEntryMap(KeyStore keyStore, KeyStoreService.PasswordProvider passwordProvider)
Copyright © 2020. All rights reserved.