The Start TLS extended request and response are used to establish
a TLS connection over the existing LDAP connection associated with
the JNDI context on which extendedOperation() is invoked.
StartTlsRequest
| Modifier and Type | Field and Description |
|---|---|
| private transient boolean | |
| private transient SSLSocketFactory | |
| private static final boolean | |
| private transient SSLSocketFactory | |
| private transient String | |
| private transient Connection | |
| private transient InputStream | |
| private transient OutputStream | |
| private static final long | |
| private transient SSLSocket | |
| private transient String[] | |
| private transient HostnameVerifier |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract javax. Closes the TLS connection gracefully and reverts back to the underlying connection. |
| private SSLSocketFactory | |
| public SSLSession | Returns: The negotiated SSL sessionImplements abstract javax. Negotiates a TLS session using the default SSL socket factory. |
| public SSLSession | Returns: The negotiated SSL sessionThe possibly null SSL socket factory to use.
If null, the default SSL socket factory is used. factory)Implements abstract javax. Negotiates a TLS session using an SSL socket factory. |
| public void | setConnection(Connection
The non-null connection to use. ldapConnection, String The server's hostname. If null, the hostname used to
open the connection will be used instead. hostname)Sets the connection for TLS to use. |
| public void | setEnabledCipherSuites(String[]
The non-null list of names of all the cipher suites to
enable. suites)Implements abstract javax. Overrides the default list of cipher suites enabled for use on the TLS connection. |
| public void | setHostnameVerifier(HostnameVerifier
The non-null hostname verifier callback. verifier)Implements abstract javax. Overrides the default hostname verifier used by |
| private SSLSocket | |
| private boolean |
| closed | back to summary |
|---|---|
| private transient boolean closed | |
| currentFactory | back to summary |
|---|---|
| private transient SSLSocketFactory currentFactory | |
| debug | back to summary |
|---|---|
| private static final boolean debug | |
| defaultFactory | back to summary |
|---|---|
| private transient SSLSocketFactory defaultFactory | |
| hostname | back to summary |
|---|---|
| private transient String hostname | |
| ldapConnection | back to summary |
|---|---|
| private transient Connection ldapConnection | |
| originalInputStream | back to summary |
|---|---|
| private transient InputStream originalInputStream | |
| originalOutputStream | back to summary |
|---|---|
| private transient OutputStream originalOutputStream | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| sslSocket | back to summary |
|---|---|
| private transient SSLSocket sslSocket | |
| suites | back to summary |
|---|---|
| private transient String[] suites | |
| verifier | back to summary |
|---|---|
| private transient HostnameVerifier verifier | |
| StartTlsResponseImpl | back to summary |
|---|---|
| public StartTlsResponseImpl() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract javax. Closes the TLS connection gracefully and reverts back to the underlying connection.
| |
| getDefaultFactory | back to summary |
|---|---|
| private SSLSocketFactory getDefaultFactory() | |
| negotiate | back to summary |
|---|---|
| public SSLSession negotiate() throws IOException Implements abstract javax. Negotiates a TLS session using the default SSL socket factory.
This method is equivalent to
| |
| negotiate | back to summary |
|---|---|
| public SSLSession negotiate(SSLSocketFactory factory) throws IOException Implements abstract javax. Negotiates a TLS session using an SSL socket factory. Creates an SSL socket using the supplied SSL socket factory and attaches it to the existing connection. Performs the TLS handshake and returns the negotiated session information.
If cipher suites have been set via
Hostname verification is performed after the TLS handshake completes.
The default check performs a case insensitive match of the server's
hostname against that in the server's certificate. The server's
hostname is extracted from the subjectAltName in the server's
certificate (if present). Otherwise the value of the common name
attribute of the subject name is used. If a callback has
been set via If an error occurs then the SSL socket is closed and an IOException is thrown. The underlying connection remains intact.
| |
| setConnection | back to summary |
|---|---|
| public void setConnection(Connection ldapConnection, String hostname) Sets the connection for TLS to use. The TLS connection will be attached to this connection.
| |
| setEnabledCipherSuites | back to summary |
|---|---|
| public void setEnabledCipherSuites(String[] suites) Implements abstract javax. Overrides the default list of cipher suites enabled for use on the
TLS connection. The cipher suites must have already been listed by
| |
| setHostnameVerifier | back to summary |
|---|---|
| public void setHostnameVerifier(HostnameVerifier verifier) Implements abstract javax. Overrides the default hostname verifier used by
| |
| startHandshake | back to summary |
|---|---|
| private SSLSocket startHandshake(SSLSocketFactory factory) throws IOException | |
| verify | back to summary |
|---|---|
| private boolean verify(String hostname, SSLSession session) throws SSLPeerUnverifiedException | |