|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetscape.ldap.LDAPSSLSocketFactory
Creates an SSL socket connection to an LDAP Server. This class
implements the LDAPSSLSocketFactoryExt
interface.
To construct an object of this class, you need to specify the
name of a class that implements the javax.net.ssl.SSLSocket
interface. If you do not specify a class name, the class
netscape.net.SSLSocket
is used by default. This
class is included with Netscape Communicator 4.05 and up.
If you are using a Java VM that provides certificate database management (such as Netscape Communicator), you can authenticate your client to a secure LDAP server by using certificates.
LDAPSSLSocketFactoryExt
,
LDAPConnection.LDAPConnection(netscape.ldap.LDAPSocketFactory)
,
Serialized FormField Summary | |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
LDAPSSLSocketFactory()
Constructs an LDAPSSLSocketFactory object using
the default SSL socket implementation,
netscape.net.SSLSocket . |
|
LDAPSSLSocketFactory(boolean clientAuth)
Constructs an LDAPSSLSocketFactory object using
the default SSL socket implementation,
netscape.net.SSLSocket . |
|
LDAPSSLSocketFactory(java.lang.String className)
Constructs an LDAPSSLSocketFactory object using
the specified class. |
|
LDAPSSLSocketFactory(java.lang.String className,
boolean clientAuth)
Constructs an LDAPSSLSocketFactory object using
the specified class. |
|
LDAPSSLSocketFactory(java.lang.String className,
java.lang.Object cipherSuites)
The constructor with the specified package for security and the specified cipher suites. |
|
LDAPSSLSocketFactory(java.lang.String className,
java.lang.Object cipherSuites,
boolean clientAuth)
The constructor with the specified package for security and the specified cipher suites. |
Method Summary | |
void |
enableClientAuth()
Enables certificate-based client authentication for an application. |
void |
enableClientAuth(java.lang.String certdb,
java.lang.String keydb,
java.lang.String keypwd,
java.lang.String certnickname,
java.lang.String keynickname)
This method is currently not implemented. Enables client authentication for an application that uses an external (file-based) certificate database. |
java.lang.Object |
getCipherSuites()
Returns the suite of ciphers used for SSL connections made through sockets created by this factory. |
java.lang.String |
getSSLSocketImpl()
Returns the name of the class that implements SSL sockets for this factory. |
boolean |
isClientAuth()
Returns true if client authentication is enabled. |
java.net.Socket |
makeSocket(java.lang.String host,
int port)
Returns a socket to the LDAP server with the specified host name and port number. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public LDAPSSLSocketFactory()
LDAPSSLSocketFactory
object using
the default SSL socket implementation,
netscape.net.SSLSocket
. (This class is provided
with Netscape Communicator 4.05 and higher.)
public LDAPSSLSocketFactory(boolean clientAuth)
LDAPSSLSocketFactory
object using
the default SSL socket implementation,
netscape.net.SSLSocket
. (This class is provided
with Netscape Communicator 4.05 and up.)
clientAuth
- true
if certificate-based client
authentication is desired. By default, client authentication is
not used.public LDAPSSLSocketFactory(java.lang.String className)
LDAPSSLSocketFactory
object using
the specified class. The class must implement the interface
javax.net.ssl.SSLSocket
.
className
- the name of a class implementing
the javax.net.ssl.SSLSocket
interface.
Pass null
for this parameter to use the
default SSL socket implementation,
netscape.net.SSLSocket
, which is included with
Netscape Communicator 4.05 and higher.public LDAPSSLSocketFactory(java.lang.String className, boolean clientAuth)
LDAPSSLSocketFactory
object using
the specified class. The class must implement the interface
javax.net.ssl.SSLSocket
.
className
- the name of a class implementing
the javax.net.ssl.SSLSocket
interface.
Pass null
for this parameter to use the
default SSL socket implementation,
netscape.net.SSLSocket
, which is included with
Netscape Communicator 4.05 and higher.clientAuth
- true
if certificate-based client
authentication is desired. By default, client authentication is
not used.public LDAPSSLSocketFactory(java.lang.String className, java.lang.Object cipherSuites)
className
- the name of a class implementing the interface
javax.net.ssl.SSLSocket
.
Pass null
for this parameter to use the
default SSL socket implementation,
netscape.net.SSLSocket
, which is included with
Netscape Communicator 4.05 and higher.cipherSuites
- the cipher suites to use for SSL connectionspublic LDAPSSLSocketFactory(java.lang.String className, java.lang.Object cipherSuites, boolean clientAuth)
className
- the name of a class implementing the interface
javax.net.ssl.SSLSocket
.
Pass null
for this parameter to use the
default SSL socket implementation,
netscape.net.SSLSocket
, which is included with
Netscape Communicator 4.05 and higher.cipherSuites
- the cipher suites to use for SSL connectionsclientAuth
- true
if certificate-based client
authentication is desired. By default, client authentication is
not used.Method Detail |
public void enableClientAuth()
makeSocket
.
isClientAuth()
,
Note: enableClientAuth() is deprecated. This method is replaced
by any one of the following constructors:
LDAPSSLSocketFactory(boolean)
LDAPSSLSocketFactory(java.lang.String, boolean)
LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean)
public void enableClientAuth(java.lang.String certdb, java.lang.String keydb, java.lang.String keypwd, java.lang.String certnickname, java.lang.String keynickname) throws LDAPException
makeSocket
.
certdb
- the pathname for the certificate databasekeydb
- the pathname for the private key databasekeypwd
- the password for the private key databasecertnickname
- the alias for the certificatekeynickname
- the alias for the key
LDAPException
- Since this method is not yet implemented,
calling this method throws an exception.
Note: enableClientAuth(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
is deprecated.
This method is replaced by any one of the following constructors:
LDAPSSLSocketFactory(boolean)
LDAPSSLSocketFactory(java.lang.String, boolean)
LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean)
isClientAuth()
,
makeSocket(java.lang.String, int)
public boolean isClientAuth()
true
if client authentication is enabled.
isClientAuth
in interface LDAPSSLSocketFactoryExt
LDAPSSLSocketFactory
public java.lang.String getSSLSocketImpl()
public java.lang.Object getCipherSuites()
getCipherSuites
in interface LDAPSSLSocketFactoryExt
public java.net.Socket makeSocket(java.lang.String host, int port) throws LDAPException
makeSocket
in interface LDAPSocketFactory
host
- the host to connect toport
- the port number
LDAPException
- A socket to the specified host and port
could not be created.LDAPSSLSocketFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |