|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.LDAPJSSEStartTLSFactory
Represents a socket factory that the method startTLS of LDAPConnection can use to create secure TLS connections to LDAP servers using JSSE technology.
LDAPConnection.LDAPConnection(LDAPSocketFactory)
,
LDAPConnection.setSocketFactory(com.novell.ldap.LDAPSocketFactory)
Constructor Summary | |
LDAPJSSEStartTLSFactory()
Constructs an LDAPJSSEStartTLSFactory object using the default settings for a JSSE SSLSocketFactory. |
|
LDAPJSSEStartTLSFactory(javax.net.ssl.SSLSocketFactory factory)
Constructs an LDAPSocketFactory using the SSLSocketFactory specified. |
Method Summary | |
java.net.Socket |
createSocket(java.net.Socket socket)
Called by startTLS and returns a TLS secured socket which is layered over the specified socket. |
java.net.Socket |
createSocket(java.lang.String host,
int port)
Returns a socket connected using the provided host name and port number. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LDAPJSSEStartTLSFactory()
Setting the keystore for the default implementation is specific to the implementation. For Sun's JSSE implementation, the property javax.net.ssl.truststore should be set to the path of a keystore that holds the trusted root certificate of the directory server.
For information on creating keystores see the keytool documentation on Java 2, security tools
public LDAPJSSEStartTLSFactory(javax.net.ssl.SSLSocketFactory factory)
Method Detail |
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException
LDAPSocketFactory
This method is called in the constructor of LDAPConnection and the resulting socket will be used for the duration of the connection.
createSocket
in interface LDAPSocketFactory
host
- The host name or a dotted string representing
the IP address of the LDAP server to which you want
to connect.
port
- The TCP or UDP port number to connect to
or contact. The default LDAP port is 389.
java.net.UnknownHostException
- The specified host could not be found.
java.io.IOException
- The socket to the specified host and port
could not be created.public java.net.Socket createSocket(java.net.Socket socket) throws java.io.IOException, java.net.UnknownHostException
LDAPTLSSocketFactory
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
createSocket
in interface LDAPTLSSocketFactory
socket
- The socket on which TLS is to be negotiated.
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.LDAPConnection.startTLS()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |