edu.vt.middleware.ldap.ssl
Class KeyStoreSSLContextInitializer

java.lang.Object
  extended by edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
      extended by edu.vt.middleware.ldap.ssl.KeyStoreSSLContextInitializer
All Implemented Interfaces:
SSLContextInitializer

public class KeyStoreSSLContextInitializer
extends AbstractSSLContextInitializer

Provides a SSLContextInitializer 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
KeyStoreSSLContextInitializer()
           
 
Method Summary
 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.
 
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
initSSLContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreSSLContextInitializer

public KeyStoreSSLContextInitializer()
Method Detail

setTrustKeystore

public void setTrustKeystore(KeyStore ks)
Sets the keystore to use for creating the trust managers.

Parameters:
ks - KeyStore

setAuthenticationKeystore

public void setAuthenticationKeystore(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 TrustManager[] getTrustManagers()
                                throws GeneralSecurityException
Returns the trust managers used when creating SSL contexts.

Specified by:
getTrustManagers in interface SSLContextInitializer
Specified by:
getTrustManagers in class AbstractSSLContextInitializer
Returns:
TrustManager[]
Throws:
GeneralSecurityException - if an errors occurs while loading the TrustManagers

getKeyManagers

public KeyManager[] getKeyManagers()
                            throws GeneralSecurityException
Returns the key managers used when creating SSL contexts.

Specified by:
getKeyManagers in interface SSLContextInitializer
Specified by:
getKeyManagers in class AbstractSSLContextInitializer
Returns:
KeyManagers[]
Throws:
GeneralSecurityException - if an errors occurs while loading the KeyManagers


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.