public final class MultipleDirectories extends java.lang.Object implements LdapDirectory
The directory entries in the entrust.ini file are passed
to a User object using either of the following:
User.login(CredentialReader credentialReader, SecureStringBuffer password)
User.setConnections(String)
Alternatively, you can create a MultipleDirectories object
with the directory entries as String objects formatted as
follows:
host1+port1,host2+port2,host3+port3,host4+port4
and passed to the user using User.setConnections(LdapDirectory, ManagerTransport).
LdapDirectory,
JNDIDirectory| Constructor and Description |
|---|
MultipleDirectories(IniFile entrustIniFile)
Creates an instance of
MultipleDirectories by
parsing the Directory information from the given entrust.ini file. |
MultipleDirectories(IniFile entrustIniFile,
java.security.cert.X509Certificate[] certs)
Creates an instance of
MultipleDirectories by
parsing the Directory information from the given entrust.ini file. |
MultipleDirectories(MultipleDirectories directories)
Copy constructor creates new object using existing parameters
|
MultipleDirectories(java.lang.String directories)
Parses the given
String into a list of host names
and port numbers. |
| Modifier and Type | Method and Description |
|---|---|
byte[][] |
getAttr(java.lang.String dn,
java.lang.String attributeToFind)
Searches for the given attribute associated with the given DN.
|
X509CRL[] |
getCRLs(java.lang.String distributionPoint,
boolean wantARL)
Searches for the CRLs or ARLs from the given distribution point.
|
JNDIDirectory |
getDirectory()
Returns the directory in use.
|
boolean |
isAvailable()
Determines whether a directory is available.
|
void |
setClientCredentials(java.security.cert.X509Certificate verificationCertificate,
java.security.cert.X509Certificate caCertificate,
java.security.PrivateKey signingKey)
Not available.
|
public MultipleDirectories(IniFile entrustIniFile) throws java.text.ParseException
MultipleDirectories by
parsing the Directory information from the given entrust.ini file.entrustIniFile - a parsed entrust.ini filejava.text.ParseException - thrown if an error occurs in parsing
the directory entriespublic MultipleDirectories(IniFile entrustIniFile, java.security.cert.X509Certificate[] certs) throws java.text.ParseException
MultipleDirectories by
parsing the Directory information from the given entrust.ini file.entrustIniFile - a parsed entrust.ini filecerts - an array of trusted certificates which can be used for LDAPS connectionsjava.text.ParseException - thrown if an error occurs in parsing
the directory entriespublic MultipleDirectories(java.lang.String directories)
throws java.text.ParseException
String into a list of host names
and port numbers.directories - directory entries in the format
host1+port1,host2+port2,host3+port3,host4+port4java.text.ParseException - thrown if an error occurs in parsing
the directory entriespublic MultipleDirectories(MultipleDirectories directories)
directories - a com.entrust.toolkit.x509.directory.MultipleDirectories object.public byte[][] getAttr(java.lang.String dn,
java.lang.String attributeToFind)
throws javax.naming.NamingException
If the current directory is not available, the method searches through the
directories to find the first one available to perform the operation. It
returns null if no attribute is found or no directory is available.
getAttr in interface LdapDirectorydn - distinguished name of the entryattributeToFind - attribute to be extracted from the entrynull if no attribute is found
or no directory is available.javax.naming.NamingException - if the search expression is malformed
or no directory can be connected to.LdapDirectory.getAttr(String, String),
JNDIDirectory.getAttr(String, String)public X509CRL[] getCRLs(java.lang.String distributionPoint, boolean wantARL) throws javax.naming.NamingException, java.security.cert.CRLException
If the current directory is not available, the method searches through the
directories to find the first one available to perform the operation. It
returns null if no directory is available.
getCRLs in interface LdapDirectorydistributionPoint - name of the distribution pointwantARL - flag indicating whether an ARL (true) or CRL (false) is
requirednull if no CRL, ARL, nor directory are found.javax.naming.NamingException - if the search expression is malformed
or no directory can be connected to.java.security.cert.CRLException - if the retrieved CRLs cannot be parsed.LdapDirectory.getCRLs(String, boolean),
JNDIDirectory.getCRLs(String, boolean)public boolean isAvailable()
isAvailable in interface LdapDirectorytrue if a directory is available,
false otherwise.LdapDirectory.isAvailable(),
JNDIDirectory.isAvailable()public void setClientCredentials(java.security.cert.X509Certificate verificationCertificate,
java.security.cert.X509Certificate caCertificate,
java.security.PrivateKey signingKey)
setClientCredentials in interface LdapDirectoryverificationCertificate - a verification certificatecaCertificate - the CA certificate that issued verificationCertificatesigningKey - the private signing key that signs messages verified by verificationCertificatepublic JNDIDirectory getDirectory()
JNDIDirectory, the directory in use; null if no
directory is available.