org.ldaptive.ssl
Class KeyStoreSSLContextInitializer

java.lang.Object
  extended by org.ldaptive.ssl.AbstractSSLContextInitializer
      extended by org.ldaptive.ssl.KeyStoreSSLContextInitializer
All Implemented Interfaces:
SSLContextInitializer

public class KeyStoreSSLContextInitializer
extends AbstractSSLContextInitializer

Provides an SSL context initializer which can use java KeyStores to create key and trust managers.

Version:
$Revision: 3121 $ $Date: 2015-10-02 16:24:35 -0400 (Fri, 02 Oct 2015) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.ssl.AbstractSSLContextInitializer
logger, trustManagers
 
Constructor Summary
KeyStoreSSLContextInitializer()
           
 
Method Summary
protected  TrustManager[] createTrustManagers()
          Creates any trust managers specific to this context initializer.
 KeyManager[] getKeyManagers()
          Returns the key managers used when creating SSL contexts.
 void setAuthenticationAliases(String... aliases)
          Sets the aliases of the entries to use in the authentication keystore.
 void setAuthenticationKeystore(KeyStore keystore)
          Sets the keystore to use for creating the key managers.
 void setAuthenticationPassword(char[] password)
          Sets the password used for accessing the authentication keystore.
 void setTrustAliases(String... aliases)
          Sets the aliases of the entries to use in the trust keystore.
 void setTrustKeystore(KeyStore keystore)
          Sets the keystore to use for creating the trust managers.
 String toString()
           
 
Methods inherited from class org.ldaptive.ssl.AbstractSSLContextInitializer
aggregateTrustManagers, getTrustManagers, initSSLContext, setTrustManagers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyStoreSSLContextInitializer

public KeyStoreSSLContextInitializer()
Method Detail

setTrustKeystore

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

Parameters:
keystore - to set

setTrustAliases

public void setTrustAliases(String... aliases)
Sets the aliases of the entries to use in the trust keystore.

Parameters:
aliases - to use

setAuthenticationKeystore

public void setAuthenticationKeystore(KeyStore keystore)
Sets the keystore to use for creating the key managers.

Parameters:
keystore - to set

setAuthenticationAliases

public void setAuthenticationAliases(String... aliases)
Sets the aliases of the entries to use in the authentication keystore.

Parameters:
aliases - to use

setAuthenticationPassword

public void setAuthenticationPassword(char[] password)
Sets the password used for accessing the authentication keystore.

Parameters:
password - to use for authentication

createTrustManagers

protected TrustManager[] createTrustManagers()
                                      throws GeneralSecurityException
Creates any trust managers specific to this context initializer.

Specified by:
createTrustManagers in class AbstractSSLContextInitializer
Returns:
trust managers
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.

Returns:
key managers
Throws:
GeneralSecurityException - if an errors occurs while loading the KeyManagers

toString

public String toString()
Overrides:
toString in class Object


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