|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.entrust.toolkit.x509.directory.JNDIDirectory
Provides an interface to a JNDI Directory.
JNDIDirectory implements the IX509Directory interface.
The class uses the Java Naming and Directory Interface (JNDI) as the means
of retrieving the data, and relies on classes delivered in
jndi.jar and ldap.jar to function correctly.
These jar files are available from
Sun Microsystems.
| Constructor Summary | |
JNDIDirectory(javax.naming.directory.DirContext dir)
Constructor used to minimize number of Directory connections. |
|
JNDIDirectory(java.lang.String ipAddress,
int port)
Constructs a JNDIDirectory object using Directory IP address and
port number as arguments. |
|
| Method Summary | |
javax.naming.directory.DirContext |
connect()
Connects to the Directory. |
byte[][] |
getAttr(java.lang.String DN,
java.lang.String attributeToFind)
Search the Directory for a given attribute within a DN entry. |
X509CRL[] |
getCRLs(java.lang.String distributionPoint,
boolean wantARL)
Finds the CRLs or ARLs from a distribution point |
javax.naming.NamingEnumeration |
Search(java.lang.String searchBase,
java.lang.String searchExpr)
Searches the Directory for a given entry within a searchbase hierarchy. |
byte[][] |
Search(java.lang.String searchBase,
java.lang.String searchExpr,
java.lang.String attributeToFind)
Searches the Directory for a given attribute within a searchbase hierarchy. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public JNDIDirectory(java.lang.String ipAddress,
int port)
JNDIDirectory object using Directory IP address and
port number as arguments.
A URL in the format ldap://ipAddress:port is constructed from this
information and stored for later use. The application must call the
connect() method before a connection to the URL is established.
ipAddress - the ip address as a string, for example, 1.2.3.4port - the port numberpublic JNDIDirectory(javax.naming.directory.DirContext dir)
The argument,
Applications using this constructor should not call the dir is an initailized JNDI DirContext
connect
method.
dir - a javax.naming.directory.DirContext object.
| Method Detail |
public javax.naming.directory.DirContext connect()
throws javax.naming.NamingException
This method establishes a new JNDI context. The method uses the IP address and
port number from the constructor, and returns this context so that the
application can use it to create additional JNDIDirectory objects
using the same Directory connection.
public javax.naming.NamingEnumeration Search(java.lang.String searchBase,
java.lang.String searchExpr)
throws javax.naming.NamingException
Search performs a search operation on the JNDI
context, using the given searchBase, searchExpr
parameters, and a subtree scope. The results are returned as a
NamingEnumeration.
searchBase - the starting point for the searchsearchExpr - the search expressionNamingEnumeration
public byte[][] Search(java.lang.String searchBase,
java.lang.String searchExpr,
java.lang.String attributeToFind)
throws javax.naming.NamingException
Search performs a search operation on the JNDI
context, using the given searchBase, searchExpr
parameters, and a subtree scope. The results are searched for the specified
attributeToFind and, if found, the method returns the matching
attributes. If the attributeToFind is not found, the method
returns null.
searchBase - the starting point for the searchsearchExpr - the search expressionattributeToFind - the attribute to be extracted from the entry
public byte[][] getAttr(java.lang.String DN,
java.lang.String attributeToFind)
throws javax.naming.NamingException
This method is required to implement the IX509Directory interface.
The desired attributes (usually userCertificate,
caCertificate, or crossCertificatePair) are extracted
from the Directory at the location specified by the Distinguished Name,
DN.
DN - the distinguished name of the entryattributeToFind - the attribute to be extracted from the entry
public X509CRL[] getCRLs(java.lang.String distributionPoint,
boolean wantARL)
throws javax.naming.NamingException,
CRLException
This method is required to implement the IX509Directory interface.
It is called during the certificate path validation process to retrieve all
of the revocation lists from a specific CRL Distribution Point.
distributionPoint - the name of the distribution pointwantARL - a flag indicating whether an ARL (true) or CRL (false) is required
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||