An X.500 Name.
TAG
public static final Tag TAG
commonName
public static final OBJECT_IDENTIFIER commonName
The OID for the common name (CN) attribute.
countryName
public static final OBJECT_IDENTIFIER countryName
The OID for the country name (C) attribute.
localityName
public static final OBJECT_IDENTIFIER localityName
The OID for the locality name (L) attribute.
organizationName
public static final OBJECT_IDENTIFIER organizationName
The OID for the organization name (O) attribute.
organizationalUnitName
public static final OBJECT_IDENTIFIER organizationalUnitName
The OID for the organizational unit name (OU) attribute.
stateOrProvinceName
public static final OBJECT_IDENTIFIER stateOrProvinceName
The OID for the state or province name (S) attribute.
addCommonName
public void addCommonName(String CN)
throws CharConversionException
Adds a common name (CN) to the Name.
CN
- The common name.
It will be formatted according to the IETF PKIX rules for
directory strings.
addCountryName
public void addCountryName(String C)
throws CharConversionException
Adds a country name (C) to the Name. It must be exactly two characters.
C
- The country name.
It will be formatted according to the IETF PKIX rules for
directory strings.
addElement
public void addElement(AVA ava)
Adds a relative distinguished name containing a single AVA.
ava
- An AttributeValueAssertion, which will be inserted as
the sole element of a new RDN, which will be stored in the Name.
addElement
public void addElement(RDN name)
Adds a relative distinguished name to the Name.
name
- A relative distinguished name (RDN) to be added to the Name.
addLocalityName
public void addLocalityName(String L)
throws CharConversionException
Adds a locality name (L) to the Name.
L
- The locality name.
It will be formatted according to the IETF PKIX rules for
directory strings.
addOrganizationName
public void addOrganizationName(String O)
throws CharConversionException
Adds an organization name (O) to the Name.
O
- The organization name.
It will be formatted according to the IETF PKIX rules for
directory strings.
addOrganizationalUnitName
public void addOrganizationalUnitName(String OU)
throws CharConversionException
Adds an organizational unit name (OU) to the Name.
OU
- The organizational unit name.
It will be formatted according to the IETF PKIX rules for
directory strings.
addStateOrProvinceName
public void addStateOrProvinceName(String S)
throws CharConversionException
Adds a state or province name (S) to the Name.
S
- The state or province name.
It will be formatted according to the IETF PKIX rules for
directory strings.
elementAt
public RDN elementAt(int idx)
Returns the RDN at the given index in the Name.
encode
public void encode(OutputStream ostream)
throws IOException
- encode in interface ASN1Value
encode
public void encode(Tag implicit,
OutputStream ostream)
throws IOException
- encode in interface ASN1Value
insertElementAt
public void insertElementAt(RDN name,
int idx)
Inserts the given RDN at the given index in the Name.
main
public static void main(args[] )
removeElementAt
public void removeElementAt(int idx)
Removes the Name element at the given index.
size
public int size()
Returns the number of RDNs in the Name.