netscape.ldap.factory
Class JSSESocketFactory
java.lang.Object
netscape.ldap.factory.JSSESocketFactory
- LDAPSocketFactory, LDAPTLSSocketFactory, java.io.Serializable
public class JSSESocketFactory
extends java.lang.Object
Creates an SSL socket connection to a server, using the JSSE package
from Sun. This class implements the
LDAPSocketFactory
interface.
Socket | makeSocket(Socket s) - Creates an SSL socket layered over an existing socket.
|
Socket | makeSocket(String host, int port) - Creates an SSL socket.
|
factory
protected SSLSocketFactory factory
suites
protected String[] suites
JSSESocketFactory
public JSSESocketFactory()
Default factory constructor
JSSESocketFactory
public JSSESocketFactory(SSLSocketFactory factory)
Factory constructor
factory
- the SSL socketfactory to use
JSSESocketFactory
public JSSESocketFactory(String[] suites)
Factory constructor
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE package
JSSESocketFactory
public JSSESocketFactory(String[] suites,
SSLSocketFactory factory)
Factory constructor
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE packagefactory
- the SSL socketfactory to use
makeSocket
public Socket makeSocket(Socket s)
throws LDAPException
Creates an SSL socket layered over an existing socket.
Used for the startTLS implementation (RFC2830).
- makeSocket in interface LDAPTLSSocketFactory
s
- An existing non-SSL socket
- A SSL socket layered over the input socket
makeSocket
public Socket makeSocket(String host,
int port)
throws LDAPException
Creates an SSL socket.
- makeSocket in interface LDAPSocketFactory
host
- Host name or IP address of SSL serverport
- Port numbers of SSL server
- A socket for an encrypted session