LDAP Classes
Implements Java LDAP

com.novell.ldap
Interface LDAPTLSSocketFactory

All Superinterfaces:
LDAPSocketFactory
All Known Implementing Classes:
LDAPJSSEStartTLSFactory

public interface LDAPTLSSocketFactory
extends LDAPSocketFactory

Used to construct a TLS socket and used by the startTLS method of LDAPConnection.

Programmers needing to provide or use specialized socket connections for startTLS can provide an implementation of this interface. Any socketFactory to be used by startTLS must implement this factory. An implementation of this factory can be set per connection or globally for all connections.

See Also:
LDAPConnection.LDAPConnection(LDAPSocketFactory), LDAPConnection.setSocketFactory(com.novell.ldap.LDAPSocketFactory)

Method Summary
 java.net.Socket createSocket(java.net.Socket clearTextSocket)
          Called by startTLS and returns a TLS secured socket which is layered over the specified socket.
 
Methods inherited from interface com.novell.ldap.LDAPSocketFactory
createSocket
 

Method Detail

createSocket

public java.net.Socket createSocket(java.net.Socket clearTextSocket)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Called by startTLS and returns a TLS secured socket which is layered over the specified socket.

Implementations of this interface MUST return a TLS secured socket which, when closed, does not close the underlying socket.

RFC2830 - the LDAP draft explaining how TLS should work in LDAP, maindates that the connection identity must match the identify in the certificate returned from the server. For more information see rfc2830 section 5.2

Parameters:
clearTextSocket - The socket on which TLS is to be negotiated.
Returns:
The socket with TLS negotiated.
Throws:
java.io.IOException - The socket to the specified host and port could not be created.
java.net.UnknownHostException - The specified host could not be found.
See Also:
LDAPConnection.startTLS()

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000