public class KeyStoreCredentialConfig extends Object implements CredentialConfig
Modifier and Type | Field and Description |
---|---|
private static int |
HASH_CODE_SEED
hash code seed.
|
private String |
keyStore
Name of the keystore to use for the SSL connection.
|
private String[] |
keyStoreAliases
Keystore aliases to use.
|
private String |
keyStorePassword
Password needed to open the keystore.
|
private KeyStoreCredentialReader |
keyStoreReader
Handles loading keystores.
|
private String |
keyStoreType
Keystore type.
|
private String |
trustStore
Name of the truststore to use for the SSL connection.
|
private String[] |
trustStoreAliases
Truststore aliases to use.
|
private String |
trustStorePassword
Password needed to open the truststore.
|
private String |
trustStoreType
Truststore type.
|
Constructor and Description |
---|
KeyStoreCredentialConfig() |
Modifier and Type | Method and Description |
---|---|
SSLContextInitializer |
createSSLContextInitializer()
Creates an SSL context initializer using the configured trust and authentication material in this config.
|
boolean |
equals(Object o) |
String |
getKeyStore()
Returns the name of the keystore to use.
|
String[] |
getKeyStoreAliases()
Returns the aliases of the keystore to use.
|
String |
getKeyStorePassword()
Returns the password for the keystore.
|
String |
getKeyStoreType()
Returns the type of the keystore.
|
String |
getTrustStore()
Returns the name of the truststore to use.
|
String[] |
getTrustStoreAliases()
Returns the aliases of the truststore to use.
|
String |
getTrustStorePassword()
Returns the password for the truststore.
|
String |
getTrustStoreType()
Returns the type of the truststore.
|
int |
hashCode() |
void |
setKeyStore(String name)
Sets the name of the keystore to use.
|
void |
setKeyStoreAliases(String... aliases)
Sets the aliases of the keystore to use.
|
void |
setKeyStorePassword(String password)
Sets the password for the keystore.
|
void |
setKeyStoreType(String type)
Sets the type of the keystore.
|
void |
setTrustStore(String name)
Sets the name of the truststore to use.
|
void |
setTrustStoreAliases(String... aliases)
Sets the aliases of the truststore to use.
|
void |
setTrustStorePassword(String password)
Sets the password for the truststore.
|
void |
setTrustStoreType(String type)
Sets the type of the truststore.
|
String |
toString() |
private static final int HASH_CODE_SEED
private final KeyStoreCredentialReader keyStoreReader
private String trustStore
private String trustStorePassword
private String trustStoreType
private String[] trustStoreAliases
private String keyStore
private String keyStorePassword
private String keyStoreType
private String[] keyStoreAliases
public String getTrustStore()
public void setTrustStore(String name)
name
- truststore namepublic String getTrustStorePassword()
public void setTrustStorePassword(String password)
password
- truststore passwordpublic String getTrustStoreType()
public void setTrustStoreType(String type)
type
- truststore typepublic String[] getTrustStoreAliases()
public void setTrustStoreAliases(String... aliases)
aliases
- truststore aliasespublic String getKeyStore()
public void setKeyStore(String name)
name
- keystore namepublic String getKeyStorePassword()
public void setKeyStorePassword(String password)
password
- keystore passwordpublic String getKeyStoreType()
public void setKeyStoreType(String type)
type
- keystore typepublic String[] getKeyStoreAliases()
public void setKeyStoreAliases(String... aliases)
aliases
- keystore aliasespublic SSLContextInitializer createSSLContextInitializer() throws GeneralSecurityException
CredentialConfig
createSSLContextInitializer
in interface CredentialConfig
GeneralSecurityException
- if the ssl context initializer cannot be createdCopyright © 2003-2019 Virginia Tech. All Rights Reserved.