org.ldaptive.ssl
Class ThreadLocalTLSSocketFactory
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.ldaptive.ssl.AbstractTLSSocketFactory
org.ldaptive.ssl.TLSSocketFactory
org.ldaptive.ssl.ThreadLocalTLSSocketFactory
public class ThreadLocalTLSSocketFactory
- extends TLSSocketFactory
TLSSocketFactory implementation that uses a thread local variable to store
configuration. Useful for SSL configurations that can only retrieve the
SSLSocketFactory from getDefault().
- Version:
- $Revision: 2940 $ $Date: 2014-03-31 11:10:46 -0400 (Mon, 31 Mar 2014) $
- Author:
- Middleware Services
| Methods inherited from class org.ldaptive.ssl.AbstractTLSSocketFactory |
createSocket, createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getFactory, getHostnameVerifier, getSocketConfig, getSupportedCipherSuites, initSSLSocket, setHostnameVerifier, setSocketConfig |
ThreadLocalTLSSocketFactory
public ThreadLocalTLSSocketFactory()
getSslConfig
public SslConfig getSslConfig()
- Returns the SSL configuration used by this socket factory.
- Overrides:
getSslConfig in class AbstractTLSSocketFactory
- Returns:
- ssl config
setSslConfig
public void setSslConfig(SslConfig config)
- Sets the SSL configuration used by this socket factory.
- Overrides:
setSslConfig in class AbstractTLSSocketFactory
- Parameters:
config - ssl config
getDefault
public static SocketFactory getDefault()
- This returns the default SSL socket factory.
- Returns:
- socket factory
getHostnameVerifierFactory
public static SSLSocketFactory getHostnameVerifierFactory(SslConfig config,
String[] names)
- Returns an instance of this socket factory configured with a hostname
verifying trust manager. If the supplied ssl config does not contain trust
managers,
HostnameVerifyingTrustManager with DefaultHostnameVerifier is set. See TLSSocketFactory.addHostnameVerifyingTrustManager(SslConfig, String[]).
- Parameters:
config - to set on the socket factorynames - to use for hostname verification
- Returns:
- socket factory
toString
public String toString()
-
- Overrides:
toString in class TLSSocketFactory
Copyright © 2003-2015 Virginia Tech. All Rights Reserved.