|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.ldaptive.ssl.AbstractTLSSocketFactory
org.ldaptive.ssl.TLSSocketFactory
public class TLSSocketFactory
An extension of SSLSocketFactory that leverages an SSL context initializer.
Note that initialize() must be called prior to using this socket
factory. This means that this class cannot be passed to implementations that
expect the socket factory to function immediately after construction.
| Field Summary |
|---|
| Fields inherited from class org.ldaptive.ssl.AbstractTLSSocketFactory |
|---|
DEFAULT_PROTOCOL, factory, logger |
| Constructor Summary | |
|---|---|
TLSSocketFactory()
|
|
| Method Summary | |
|---|---|
protected static void |
addHostnameVerifyingTrustManager(SslConfig config,
String[] names)
Adds a HostnameVerifyingTrustManager to the supplied config if no
trust managers have been configured. |
static SocketFactory |
getDefault()
Returns the default SSL socket factory. |
static SSLSocketFactory |
getHostnameVerifierFactory(SslConfig config,
String[] names)
Returns an instance of this socket factory configured with a hostname verifying trust manager. |
void |
initialize()
Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use. |
String |
toString()
|
| Methods inherited from class org.ldaptive.ssl.AbstractTLSSocketFactory |
|---|
createSocket, createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getFactory, getHostnameVerifier, getSocketConfig, getSslConfig, getSupportedCipherSuites, initSSLSocket, setHostnameVerifier, setSocketConfig, setSslConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TLSSocketFactory()
| Method Detail |
|---|
public void initialize()
throws GeneralSecurityException
initialize in class AbstractTLSSocketFactoryGeneralSecurityException - if the SSLContext cannot be createdpublic static SocketFactory getDefault()
public static SSLSocketFactory getHostnameVerifierFactory(SslConfig config,
String[] names)
HostnameVerifyingTrustManager with DefaultHostnameVerifier is set. See addHostnameVerifyingTrustManager(SslConfig, String[]).
config - to set on the socket factorynames - to use for hostname verification
protected static void addHostnameVerifyingTrustManager(SslConfig config,
String[] names)
HostnameVerifyingTrustManager to the supplied config if no
trust managers have been configured. A DefaultTrustManager is also
added in no CredentialConfig has been configured.
config - to modifynames - of the hosts to verifypublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||