edu.vt.middleware.ldap.ssl
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 |
---|---|
javax.net.ssl.KeyManager[] |
getKeyManagers()
Returns the key managers used when creating SSL contexts.
|
javax.net.ssl.TrustManager[] |
getTrustManagers()
Returns the trust managers used when creating SSL contexts.
|
void |
setAuthenticationKeystore(java.security.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(java.security.KeyStore ks)
Sets the keystore to use for creating the trust managers.
|
initSSLContext
public void setTrustKeystore(java.security.KeyStore ks)
ks
- KeyStore
public void setAuthenticationKeystore(java.security.KeyStore ks)
ks
- KeyStore
public void setAuthenticationPassword(char[] password)
password
- char[]
public javax.net.ssl.TrustManager[] getTrustManagers() throws java.security.GeneralSecurityException
getTrustManagers
in interface SSLContextInitializer
getTrustManagers
in class AbstractSSLContextInitializer
TrustManager[]
java.security.GeneralSecurityException
- if an errors occurs while loading the
TrustManagerspublic javax.net.ssl.KeyManager[] getKeyManagers() throws java.security.GeneralSecurityException
getKeyManagers
in interface SSLContextInitializer
getKeyManagers
in class AbstractSSLContextInitializer
KeyManagers[]
java.security.GeneralSecurityException
- if an errors occurs while loading the
KeyManagersCopyright © 2014. All Rights Reserved.