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 aSSLContextInitializerwhich 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.voidsetAuthenticationKeystore(java.security.KeyStore ks)Sets the keystore to use for creating the key managers.voidsetAuthenticationPassword(char[] password)Sets the password used for accessing the authentication keystore.voidsetTrustKeystore(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.GeneralSecurityExceptionReturns the trust managers used when creating SSL contexts.- Specified by:
getTrustManagersin interfaceSSLContextInitializer- Specified by:
getTrustManagersin 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.GeneralSecurityExceptionReturns the key managers used when creating SSL contexts.- Specified by:
getKeyManagersin interfaceSSLContextInitializer- Specified by:
getKeyManagersin classAbstractSSLContextInitializer- Returns:
KeyManagers[]- Throws:
java.security.GeneralSecurityException- if an errors occurs while loading the KeyManagers
-
-