public class KeyStoreCredentialConfig extends java.lang.Object implements CredentialConfig
| Modifier and Type | Field and Description |
|---|---|
private static int |
HASH_CODE_SEED
hash code seed.
|
private java.lang.String |
keyStore
Name of the keystore to use for the SSL connection.
|
private java.lang.String[] |
keyStoreAliases
Keystore aliases to use.
|
private java.lang.String |
keyStorePassword
Password needed to open the keystore.
|
private KeyStoreCredentialReader |
keyStoreReader
Handles loading keystores.
|
private java.lang.String |
keyStoreType
Keystore type.
|
private java.lang.String |
trustStore
Name of the truststore to use for the SSL connection.
|
private java.lang.String[] |
trustStoreAliases
Truststore aliases to use.
|
private java.lang.String |
trustStorePassword
Password needed to open the truststore.
|
private java.lang.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(java.lang.Object o) |
java.lang.String |
getKeyStore()
Returns the name of the keystore to use.
|
java.lang.String[] |
getKeyStoreAliases()
Returns the aliases of the keystore to use.
|
java.lang.String |
getKeyStorePassword()
Returns the password for the keystore.
|
java.lang.String |
getKeyStoreType()
Returns the type of the keystore.
|
java.lang.String |
getTrustStore()
Returns the name of the truststore to use.
|
java.lang.String[] |
getTrustStoreAliases()
Returns the aliases of the truststore to use.
|
java.lang.String |
getTrustStorePassword()
Returns the password for the truststore.
|
java.lang.String |
getTrustStoreType()
Returns the type of the truststore.
|
int |
hashCode() |
void |
setKeyStore(java.lang.String name)
Sets the name of the keystore to use.
|
void |
setKeyStoreAliases(java.lang.String... aliases)
Sets the aliases of the keystore to use.
|
void |
setKeyStorePassword(java.lang.String password)
Sets the password for the keystore.
|
void |
setKeyStoreType(java.lang.String type)
Sets the type of the keystore.
|
void |
setTrustStore(java.lang.String name)
Sets the name of the truststore to use.
|
void |
setTrustStoreAliases(java.lang.String... aliases)
Sets the aliases of the truststore to use.
|
void |
setTrustStorePassword(java.lang.String password)
Sets the password for the truststore.
|
void |
setTrustStoreType(java.lang.String type)
Sets the type of the truststore.
|
java.lang.String |
toString() |
private static final int HASH_CODE_SEED
private final KeyStoreCredentialReader keyStoreReader
private java.lang.String trustStore
private java.lang.String trustStorePassword
private java.lang.String trustStoreType
private java.lang.String[] trustStoreAliases
private java.lang.String keyStore
private java.lang.String keyStorePassword
private java.lang.String keyStoreType
private java.lang.String[] keyStoreAliases
public java.lang.String getTrustStore()
public void setTrustStore(java.lang.String name)
name - truststore namepublic java.lang.String getTrustStorePassword()
public void setTrustStorePassword(java.lang.String password)
password - truststore passwordpublic java.lang.String getTrustStoreType()
public void setTrustStoreType(java.lang.String type)
type - truststore typepublic java.lang.String[] getTrustStoreAliases()
public void setTrustStoreAliases(java.lang.String... aliases)
aliases - truststore aliasespublic java.lang.String getKeyStore()
public void setKeyStore(java.lang.String name)
name - keystore namepublic java.lang.String getKeyStorePassword()
public void setKeyStorePassword(java.lang.String password)
password - keystore passwordpublic java.lang.String getKeyStoreType()
public void setKeyStoreType(java.lang.String type)
type - keystore typepublic java.lang.String[] getKeyStoreAliases()
public void setKeyStoreAliases(java.lang.String... aliases)
aliases - keystore aliasespublic SSLContextInitializer createSSLContextInitializer() throws java.security.GeneralSecurityException
CredentialConfigcreateSSLContextInitializer in interface CredentialConfigjava.security.GeneralSecurityException - if the ssl context initializer cannot be createdpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object