Class LDAPUtils
java.lang.Object
org.bouncycastle.ldap.LDAPUtils
General utility methods for assisting with preparation of LDAP queries.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LDAPUtils
public LDAPUtils()
-
-
Method Details
-
parseDN
Parse out the contents of a particular subject attribute name from the string form of an X.500 DN.The attribute is only recognised as the type of an RDN component, that is as "name=" at the start of the DN or after an unescaped ',' or '+' separator, never inside another attribute's value. The value runs to the next unescaped separator outside a quoted string, without the spaces around it or the quotes around a quoted value, so both the RFC 2253 and the RFC 1779 string forms are read. The escapes of the string form are decoded, so the value is searched for as the directory stores it. An absent attribute, or one with an empty value, results in an empty string.
- Parameters:
subject- string form of an X.500 DN.subjectAttributeName- the RDN attribute name of interest.- Returns:
- an escaped string suitable for use in an LDAP query.
-