|
LDAPJDK 4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
netscape.ldap.factory.JSSSocketFactory
Creates an SSL socket connection to a server, using the iPlanet JSS package.
This class implements the LDAPSocketFactory
interface.
NOTE: This class is iPlanet internal and is distributed only with iPlanet products.
By default, the factory is using "secmod.db", "key3.db" and "cert7.db"
databases in the current directory. If you need to override this default
setting, then you should call the static initialize
method
before creating the first instance of JSSSocketFactory
.
... JSSSocketFactory.initialize("../mySecModDB", "../myKeyDB", "../myCertDB"); LDAPConnection ld = new LDAPConnection(new JSSSocketFactory()); ...
LDAPSocketFactory
,
LDAPConnection.LDAPConnection(netscape.ldap.LDAPSocketFactory)
, Serialized FormField Summary | |
static java.lang.String |
defaultCertDB
Default certificate database path "cert7.db". |
static java.lang.String |
defaultKeyDB
Default key database path = "key3.db". |
static java.lang.String |
defaultModDB
Default security module database path = "secmod.db". |
Constructor Summary | |
JSSSocketFactory()
Constructs a new JSSSocketFactory . |
Method Summary | |
boolean |
approve(com.netscape.jss.crypto.X509Certificate serverCert,
com.netscape.jss.ssl.SSLCertificateApprovalCallback.ValidityStatus status)
The default implementation of the SSLCertificateApprovalCallback interface. |
java.lang.String |
getCertDB()
Returns the full path of the certificate database. |
static java.lang.String |
getKeyDB()
Returns the full path of the key database. |
static java.lang.String |
getModDB()
Returns the full path of the security module database. |
static void |
initialize(java.lang.String moddb,
java.lang.String keydb,
java.lang.String certdb)
Initialize the JSS security subsystem. |
java.net.Socket |
makeSocket(java.lang.String host,
int port)
Creates an SSL socket |
Field Detail |
public static final java.lang.String defaultModDB
public static final java.lang.String defaultKeyDB
public static final java.lang.String defaultCertDB
Constructor Detail |
public JSSSocketFactory() throws LDAPException
JSSSocketFactory
.
If the security system is not already initialized, initialize it
using the default name and location for the security module
database, key database and certificate databases. If you need to
use non-default database files, then you must explicitly call the
initialize
method before calling this constructor.
initialize(java.lang.String, java.lang.String, java.lang.String)
Method Detail |
public static void initialize(java.lang.String moddb, java.lang.String keydb, java.lang.String certdb) throws LDAPException
This method allows you to override the default name and location of
the security module database, key database and certificate databases.
The method may be called only once, before the first instance of
JSSSocketFactory
is created. When the first instance
of JSSSocketFactory
is created, the constructor will
automatically initialize the security subsystem using the default
database names, unless the security subsystem is already initialized.
moddb
- The full path, relative or absolute, of the security
module database.keydb
- The full path, relative or absolute, of the key database.keydb
- The full path, relative or absolute, of the certificate
database.public static java.lang.String getModDB()
public static java.lang.String getKeyDB()
public java.lang.String getCertDB()
public java.net.Socket makeSocket(java.lang.String host, int port) throws LDAPException
host
- Host name or IP address of SSL serverport
- Port numbers of SSL serverpublic boolean approve(com.netscape.jss.crypto.X509Certificate serverCert, com.netscape.jss.ssl.SSLCertificateApprovalCallback.ValidityStatus status)
This default implementation always returns true. If you need to verify the server certificate validity, then you should override this method.
serverCert
- X509 Certificatestatus
- The validity of the server certificatetrue
, by default we trust the certificate
|
LDAPJDK 4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |