public class KeyStoreSSLContextInitializer extends AbstractSSLContextInitializer
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String[] |
authenticationAliases
Aliases of key entries to use.
|
private java.security.KeyStore |
authenticationKeystore
KeyStore used to create key managers.
|
private char[] |
authenticationPassword
Password used to access the authentication keystore.
|
private java.lang.String[] |
trustAliases
Aliases of trust entries to use.
|
private java.security.KeyStore |
trustKeystore
KeyStore used to create trust managers.
|
logger, trustManagers| Constructor and Description |
|---|
KeyStoreSSLContextInitializer() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.net.ssl.TrustManager[] |
createTrustManagers()
Creates any trust managers specific to this context initializer.
|
javax.net.ssl.KeyManager[] |
getKeyManagers()
Returns the key managers used when creating SSL contexts.
|
void |
setAuthenticationAliases(java.lang.String... aliases)
Sets the aliases of the entries to use in the authentication keystore.
|
void |
setAuthenticationKeystore(java.security.KeyStore keystore)
Sets the keystore to use for creating the key managers.
|
void |
setAuthenticationPassword(char[] password)
Sets the password used for accessing the authentication keystore.
|
void |
setTrustAliases(java.lang.String... aliases)
Sets the aliases of the entries to use in the trust keystore.
|
void |
setTrustKeystore(java.security.KeyStore keystore)
Sets the keystore to use for creating the trust managers.
|
java.lang.String |
toString() |
aggregateTrustManagers, getTrustManagers, initSSLContext, setTrustManagersprivate java.security.KeyStore trustKeystore
private java.lang.String[] trustAliases
private java.security.KeyStore authenticationKeystore
private java.lang.String[] authenticationAliases
private char[] authenticationPassword
public void setTrustKeystore(java.security.KeyStore keystore)
keystore - to setpublic void setTrustAliases(java.lang.String... aliases)
aliases - to usepublic void setAuthenticationKeystore(java.security.KeyStore keystore)
keystore - to setpublic void setAuthenticationAliases(java.lang.String... aliases)
aliases - to usepublic void setAuthenticationPassword(char[] password)
password - to use for authenticationprotected javax.net.ssl.TrustManager[] createTrustManagers()
throws java.security.GeneralSecurityException
AbstractSSLContextInitializercreateTrustManagers in class AbstractSSLContextInitializerjava.security.GeneralSecurityException - if an errors occurs while loading the TrustManagerspublic javax.net.ssl.KeyManager[] getKeyManagers()
throws java.security.GeneralSecurityException
SSLContextInitializerjava.security.GeneralSecurityException - if an errors occurs while loading the KeyManagerspublic java.lang.String toString()
toString in class java.lang.Object