public class LDAPJSSESecureSocketFactory extends Object implements com.novell.ldap.LDAPSocketFactory, org.ietf.ldap.LDAPSocketFactory
LDAPConnection#LDAPConnection(LDAPSocketFactory),
LDAPConnection#setSocketFactory| Constructor and Description |
|---|
LDAPJSSESecureSocketFactory()
Constructs an LDAPSecureSocketFactory object using the default provider
for a JSSE SSLSocketFactory.
|
LDAPJSSESecureSocketFactory(SSLSocketFactory factory)
Constructs an LDAPSocketFactory object using the
SSLSocketFactory specified.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket(String host,
int port)
Returns the socket connected to the LDAP server with the specified
host name and port number.
|
int |
getConnectTimeout() |
void |
setConnectTimeout(int connectTimeout) |
public LDAPJSSESecureSocketFactory()
Setting the keystore for the default provider is specific to the provider implementation. For Sun's JSSE provider, 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 LDAPJSSESecureSocketFactory(SSLSocketFactory factory)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public Socket createSocket(String host, int port) throws IOException, UnknownHostException
The secure connection is established to the server when this call returns. This method is called by the constructor of LDAPConnection
createSocket in interface org.ietf.ldap.LDAPSocketFactoryhost - The host name or a dotted string representing the IP address
of the LDAP server to which you want to establish
a connection.
port - The port number on the specified LDAP server that you want to
use for this connection. The default LDAP port for SSL
connections is 636.IOException - A socket to the specified host and port
could not be created.UnknownHostException - The specified host could not be found.Copyright © 2003–2022 Sakai Project. All rights reserved.