org.mozilla.jss.pkix.primitive
public class Name extends Object implements ASN1Value
Nested Class Summary | |
---|---|
static class | Name.Template |
Field Summary | |
---|---|
static OBJECT_IDENTIFIER | commonName
The OID for the common name (CN) attribute. |
static OBJECT_IDENTIFIER | countryName
The OID for the country name (C) attribute. |
static OBJECT_IDENTIFIER | localityName
The OID for the locality name (L) attribute. |
static OBJECT_IDENTIFIER | organizationalUnitName
The OID for the organizational unit name (OU) attribute. |
static OBJECT_IDENTIFIER | organizationName
The OID for the organization name (O) attribute. |
static OBJECT_IDENTIFIER | stateOrProvinceName
The OID for the state or province name (S) attribute. |
static Tag | TAG |
Constructor Summary | |
---|---|
Name()
Creates an empty Name. |
Method Summary | |
---|---|
void | addCommonName(String CN)
Adds a common name (CN) to the Name. |
void | addCountryName(String C)
Adds a country name (C) to the Name. |
void | addElement(RDN name)
Adds a relative distinguished name to the Name.
|
void | addElement(AVA ava)
Adds a relative distinguished name containing a single AVA.
|
void | addLocalityName(String L)
Adds a locality name (L) to the Name. |
void | addOrganizationalUnitName(String OU)
Adds an organizational unit name (OU) to the Name. |
void | addOrganizationName(String O)
Adds an organization name (O) to the Name. |
void | addStateOrProvinceName(String S)
Adds a state or province name (S) to the Name. |
RDN | elementAt(int idx)
Returns the RDN at the given index in the Name. |
void | encode(OutputStream ostream) |
void | encode(Tag implicit, OutputStream ostream) |
String | getRFC1485() |
Tag | getTag() |
static Name.Template | getTemplate() |
void | insertElementAt(RDN name, int idx)
Inserts the given RDN at the given index in the Name. |
static void | main(String[] args) |
void | removeElementAt(int idx)
Removes the Name element at the given index. |
int | size()
Returns the number of RDNs in the Name. |
Parameters: CN The common name. It will be formatted according to the IETF PKIX rules for directory strings.
Parameters: C The country name. It will be formatted according to the IETF PKIX rules for directory strings.
Throws: IllegalArgumentException If C.length() != 2.
Parameters: name A relative distinguished name (RDN) to be added to the Name.
Parameters: ava An AttributeValueAssertion, which will be inserted as the sole element of a new RDN, which will be stored in the Name.
Parameters: L The locality name. It will be formatted according to the IETF PKIX rules for directory strings.
Parameters: OU The organizational unit name. It will be formatted according to the IETF PKIX rules for directory strings.
Parameters: O The organization name. It will be formatted according to the IETF PKIX rules for directory strings.
Parameters: S The state or province name. It will be formatted according to the IETF PKIX rules for directory strings.