public class KeyStoreKeyManager extends Object implements TrustKeyManager
| Modifier and Type | Field and Description |
|---|---|
static String |
KEYSTORE_PASS |
static String |
KEYSTORE_URL |
static String |
SIGNING_KEY_ALIAS |
static String |
SIGNING_KEY_PASS |
| Constructor and Description |
|---|
KeyStoreKeyManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalOption(String key,
Object value)
Add general options
|
Object |
getAdditionalOption(String key)
Get additional option
|
Certificate |
getCertificate(String alias)
Get the certificate given an alias
|
SecretKey |
getEncryptionKey(String domain,
String encryptionAlgorithm,
int keyLength)
Given a domain, obtain a secret key
|
PublicKey |
getPublicKey(String alias)
Get a Public Key given an alias
|
PrivateKey |
getSigningKey()
Get the Signing Key
|
KeyPair |
getSigningKeyPair()
Constructs a
KeyPair instance containing the signing key (PrivateKey) and associated PublicKey. |
PublicKey |
getValidatingKey(String domain)
Get the validating public key Note:: The domain is mapped to an alias in the keystore
|
void |
setAuthProperties(List<AuthPropertyType> authList)
Provide a set of properties used for authentication into the storage of keys - keystore, ldap, db, HSM etc
|
void |
setValidatingAlias(List<KeyValueType> aliases)
Set a list of (domain,alias) tuple to trust domains The alias is a string that represents the validating key
stored for a
domain
|
public static final String KEYSTORE_URL
public static final String KEYSTORE_PASS
public static final String SIGNING_KEY_PASS
public static final String SIGNING_KEY_ALIAS
public PrivateKey getSigningKey() throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagergetSigningKey in interface TrustKeyManagerTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.getSigningKey()public KeyPair getSigningKeyPair() throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
Constructs a KeyPair instance containing the signing key (PrivateKey) and associated PublicKey.
getSigningKeyPair in interface TrustKeyManagerKeyPair object.TrustKeyConfigurationExceptionTrustKeyProcessingExceptionpublic Certificate getCertificate(String alias) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagergetCertificate in interface TrustKeyManagerTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.getCertificate(String)public PublicKey getPublicKey(String alias) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagergetPublicKey in interface TrustKeyManagerTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.getPublicKey(String)public PublicKey getValidatingKey(String domain) throws TrustKeyConfigurationException, TrustKeyProcessingException
getValidatingKey in interface TrustKeyManagerIOExceptionTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.getValidatingKey(String),
TrustKeyManager.getPublicKey(String)public void setAuthProperties(List<AuthPropertyType> authList) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagersetAuthProperties in interface TrustKeyManagerTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.setAuthProperties(List)public void setValidatingAlias(List<KeyValueType> aliases) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagersetValidatingAlias in interface TrustKeyManagerTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager.setValidatingAlias(List)public SecretKey getEncryptionKey(String domain, String encryptionAlgorithm, int keyLength) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManagergetEncryptionKey in interface TrustKeyManagerencryptionAlgorithm - Encryption AlgorithmkeyLength - length of keysGeneralSecurityExceptionTrustKeyConfigurationExceptionTrustKeyProcessingExceptionTrustKeyManager#getEncryptionKey(String)public void addAdditionalOption(String key, Object value)
TrustKeyManageraddAdditionalOption in interface TrustKeyManagerTrustKeyManager.addAdditionalOption(java.lang.String,
java.lang.Object)public Object getAdditionalOption(String key)
TrustKeyManagergetAdditionalOption in interface TrustKeyManagerTrustKeyManager.getAdditionalOption(java.lang.String)Copyright © 2018 JBoss by Red Hat. All rights reserved.