public class KeyStoreSSLContextInitializer extends AbstractSSLContextInitializer
SSLContextInitializer
which can use java KeyStores to
create key and trust managers.logger
Constructor and Description |
---|
KeyStoreSSLContextInitializer() |
Modifier and Type | Method and Description |
---|---|
KeyManager[] |
getKeyManagers()
Returns the key managers used when creating SSL contexts.
|
TrustManager[] |
getTrustManagers()
Returns the trust managers used when creating SSL contexts.
|
void |
setAuthenticationKeystore(KeyStore ks)
Sets the keystore to use for creating the key managers.
|
void |
setAuthenticationPassword(char[] password)
Sets the password used for accessing the authentication keystore.
|
void |
setTrustKeystore(KeyStore ks)
Sets the keystore to use for creating the trust managers.
|
initSSLContext
public void setTrustKeystore(KeyStore ks)
ks
- KeyStore
public void setAuthenticationKeystore(KeyStore ks)
ks
- KeyStore
public void setAuthenticationPassword(char[] password)
password
- char[]
public TrustManager[] getTrustManagers() throws GeneralSecurityException
getTrustManagers
in interface SSLContextInitializer
getTrustManagers
in class AbstractSSLContextInitializer
TrustManager[]
GeneralSecurityException
- if an errors occurs while loading the
TrustManagerspublic KeyManager[] getKeyManagers() throws GeneralSecurityException
getKeyManagers
in interface SSLContextInitializer
getKeyManagers
in class AbstractSSLContextInitializer
KeyManagers[]
GeneralSecurityException
- if an errors occurs while loading the
KeyManagersCopyright © 2016. All rights reserved.