Package edu.vt.middleware.ldap.ssl
Class KeyStoreSSLContextInitializer
- java.lang.Object
-
- edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
-
- edu.vt.middleware.ldap.ssl.KeyStoreSSLContextInitializer
-
- All Implemented Interfaces:
SSLContextInitializer
public class KeyStoreSSLContextInitializer extends AbstractSSLContextInitializer
Provides aSSLContextInitializer
which can use java KeyStores to create key and trust managers.- Version:
- $Revision: 1106 $ $Date: 2010-01-29 23:34:13 -0500 (Fri, 29 Jan 2010) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
logger
-
-
Constructor Summary
Constructors Constructor Description KeyStoreSSLContextInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
initSSLContext
-
-
-
-
Method Detail
-
setTrustKeystore
public void setTrustKeystore(java.security.KeyStore ks)
Sets the keystore to use for creating the trust managers.- Parameters:
ks
-KeyStore
-
setAuthenticationKeystore
public void setAuthenticationKeystore(java.security.KeyStore ks)
Sets the keystore to use for creating the key managers.- Parameters:
ks
-KeyStore
-
setAuthenticationPassword
public void setAuthenticationPassword(char[] password)
Sets the password used for accessing the authentication keystore.- Parameters:
password
-char[]
-
getTrustManagers
public javax.net.ssl.TrustManager[] getTrustManagers() throws java.security.GeneralSecurityException
Returns the trust managers used when creating SSL contexts.- Specified by:
getTrustManagers
in interfaceSSLContextInitializer
- Specified by:
getTrustManagers
in classAbstractSSLContextInitializer
- Returns:
TrustManager[]
- Throws:
java.security.GeneralSecurityException
- if an errors occurs while loading the TrustManagers
-
getKeyManagers
public javax.net.ssl.KeyManager[] getKeyManagers() throws java.security.GeneralSecurityException
Returns the key managers used when creating SSL contexts.- Specified by:
getKeyManagers
in interfaceSSLContextInitializer
- Specified by:
getKeyManagers
in classAbstractSSLContextInitializer
- Returns:
KeyManagers[]
- Throws:
java.security.GeneralSecurityException
- if an errors occurs while loading the KeyManagers
-
-