Class RDN
java.lang.Object
org.mozilla.jss.netscape.security.x509.RDN
RDNs are a set of {attribute = value} assertions. Some of those
attributes are "distinguished" (unique w/in context). Order is
never relevant.
Some X.500 names include only a single distinguished attribute
per RDN. This style is currently common.
Note that DER-encoded RDNs sort AVAs by assertion OID ... so that
when we parse this data we don't have to worry about canonicalizing
it, but we'll need to sort them when we expose the RDN class more.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a RDN from a Ldap DN String with one RDN component using the global default LdapDNStrConverter.Like RDN(String) with a DER encoding order given as argument for Directory Strings.RDN
(String rdnString, LdapDNStrConverter ldapDNStrConverter) Constructs a RDN from a Ldap DN string with one RDN component using the specified Ldap DN Str converter.convenience method.RDN
(DerInputStream in) Constructs a RDN from a Der Input Stream.Constructs a RDN from a DerValue.Constructs a RDN from an array of AVA. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(DerOutputStream out) Encodes this RDN to a Der output stream.boolean
(package private) DerValue
AVA[]
returns an array of AVA in the RDN.int
returns the number of AVAs in the RDN.getAVAs()
returns an enumeration of AVAs that make up this RDN.int
hashCode()
Returns a Ldap DN string with one RDN component using the global default LdapDNStrConverter.toLdapDNString
(LdapDNStrConverter ldapDNStrConverter) Returns a Ldap DN String with this RDN component using the specified LdapDNStrConverter.toString()
Returns a Ldap DN string with this RDN component using the global default LdapDNStrConverter.
-
Field Details
-
assertion
-
-
Constructor Details
-
RDN
Constructs a RDN from a Ldap DN String with one RDN component using the global default LdapDNStrConverter.- Parameters:
rdnString
- a Ldap DN string with one RDN component, e.g. as defined in RFC1779.- Throws:
IOException
- if error occurs while parsing the string.- See Also:
-
RDN
Like RDN(String) with a DER encoding order given as argument for Directory Strings.- Throws:
IOException
-
RDN
Constructs a RDN from a Ldap DN string with one RDN component using the specified Ldap DN Str converter. For example, RFC1779StrConverter can be passed to parse a Ldap DN string in RFC1779 format.- Parameters:
rdnString
- Ldap DN string.ldapDNStrConverter
- a LdapDNStrConverter.- Throws:
IOException
- See Also:
-
RDN
Constructs a RDN from a DerValue.- Parameters:
set
- Der value of a set of AVAs.- Throws:
IOException
-
RDN
Constructs a RDN from a Der Input Stream.- Parameters:
in
- a Der Input Stream.- Throws:
IOException
-
RDN
Constructs a RDN from an array of AVA.- Parameters:
avas
- a AVA Array.
-
RDN
convenience method.
-
-
Method Details
-
getAssertion
returns an array of AVA in the RDN.- Returns:
- array of AVA in this RDN.
-
getAssertionLength
public int getAssertionLength()returns the number of AVAs in the RDN.- Returns:
- number of AVAs in this RDN.
-
hashCode
public int hashCode() -
equals
-
findAttribute
-
encode
Encodes this RDN to a Der output stream.- Parameters:
out
- the Der Output Stream.- Throws:
IOException
-
getAVAs
returns an enumeration of AVAs that make up this RDN.- Returns:
- an enumeration of AVAs that make up this RDN.
-
toLdapDNString
Returns a Ldap DN string with one RDN component using the global default LdapDNStrConverter.- Returns:
- the Ldap DN String of this RDN.
- Throws:
IOException
- if an error occurs during the conversion.- See Also:
-
toLdapDNString
Returns a Ldap DN String with this RDN component using the specified LdapDNStrConverter.- Parameters:
ldapDNStrConverter
- a LdapDNStrConverter.- Returns:
- a Ldap DN String.
- Throws:
IOException
- if an error occurs in the conversion.- See Also:
-
toString
Returns a Ldap DN string with this RDN component using the global default LdapDNStrConverter.
-