public abstract class KeyStoreWrapper extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Modifier | Constructor and Description |
---|---|
protected |
KeyStoreWrapper() |
Modifier and Type | Method and Description |
---|---|
protected Key |
getDefaultPrivateKey()
Returns the key based on default alias or password
|
protected Key |
getKey(String alias,
String keyPassword)
Returns the key based on provided alias and key password
|
protected KeyStore |
getKeyStore()
Returns KeyStore Information
|
protected Key |
getPrivateKey(String alias)
Returns the key based on default key password
|
PublicKey |
getPublicKey()
Returns the public key based on initialization data
|
PublicKey |
getPublicKey(String alias)
Returns the public key for the given alias
|
protected Key |
getPublicKeyFromCertificate(String alias)
Returns the key based on certificate of the owner to who given alias belong
|
SecretKey |
getSecretKey()
Returns the secret key based on initialization data
|
SecretKey |
getSecretKey(String alias,
String keyPassword)
Returns the secret key
|
protected void |
init(KeyStoreInformation information,
String keyPassword)
Initialize the KeyStore wrapper based on provided KeyStoreInformation and passwords
|
protected void init(KeyStoreInformation information, String keyPassword)
information
- The object that has encapsulated all information for a
keyStore excepts passwordskeyPassword
- Specifies the password of the key within the keyStoreprotected Key getKey(String alias, String keyPassword)
alias
- The alias of the certificate in the specified keyStorekeyPassword
- Password for key within the KeyStroreprotected Key getPublicKeyFromCertificate(String alias)
alias
- The alias of the certificate in the specified keyStoreprotected Key getDefaultPrivateKey()
protected Key getPrivateKey(String alias)
alias
- The aliaspublic PublicKey getPublicKey(String alias)
alias
- The alias of the certificate in the specified keyStorepublic PublicKey getPublicKey()
protected KeyStore getKeyStore()
public SecretKey getSecretKey(String alias, String keyPassword)
alias
- The alias of the certificate in the specified keyStorekeyPassword
- Password to access secret keypublic SecretKey getSecretKey()
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.