|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.security12.sun.security.x509.X500Name
X.500 names are used to identify entities, such as those which are identified by X.509 certificates. They are world-wide, hierarchical, and descriptive. Entities can be identified by attributes, and in some systems can be searched for according to those attributes.
GeneralName
,
GeneralNames
,
GeneralNameInterface
Field Summary | |
static ObjectIdentifier |
commonName_oid
OID for the "CN=" attribute, denoting a person's common name. |
static ObjectIdentifier |
countryName_oid
OID for the "C=" attribute, denoting a country. |
static ObjectIdentifier |
ipAddress_oid
OID for "IP=" IP address attributes, used with SKIP. |
static ObjectIdentifier |
localityName_oid
OID for the "L=" attribute, denoting a locality (such as a city) |
static ObjectIdentifier |
orgName_oid
OID for the "O=" attribute, denoting an organization name |
static ObjectIdentifier |
orgUnitName_oid
OID for the "OU=" attribute, denoting an organizational unit name |
static ObjectIdentifier |
stateName_oid
OID for the "S=" attribute, denoting a state (such as Delaware) |
static ObjectIdentifier |
streetAddress_oid
OID for the "STREET=" attribute, denoting a street address. |
static ObjectIdentifier |
title_oid
OID for the "T=" attribute, denoting a person's title. |
Constructor Summary | |
X500Name(byte[] name)
Constructs a name from an ASN.1 encoded byte array. |
|
X500Name(DerInputStream in)
Constructs a name from an ASN.1 encoded input stream. |
|
X500Name(DerValue value)
Constructs a name from an ASN.1 encoded value. |
|
X500Name(String dname)
Constructs a name from a conventionally formatted string, such as "CN=Dave, OU=JavaSoft, O=Sun Microsystems, C=US". |
|
X500Name(String commonName,
String organizationUnit,
String organizationName,
String country)
Constructs a name from fields common in enterprise application environments. |
|
X500Name(String commonName,
String organizationUnit,
String organizationName,
String localityName,
String stateName,
String country)
Constructs a name from fields common in Internet application environments. |
Method Summary | |
void |
emit(DerOutputStream out)
Deprecated. Use encode() instead |
void |
encode(DerOutputStream out)
Encodes the name in DER-encoded form. |
boolean |
equals(Object other)
Compares this name with another, for equality. |
boolean |
equals(X500Name other)
Compares this name with another, for equality. |
String |
getCommonName()
Returns a "Common Name" component. |
String |
getCountry()
Returns a "Country" name component. |
byte[] |
getEncoded()
Gets the name in DER-encoded form. |
String |
getLocality()
Returns a "Locality" name component. |
String |
getName()
Returns the value of toString(). |
String |
getOrganization()
Returns an "Organization" name component. |
String |
getOrganizationalUnit()
Returns an "Organizational Unit" name component. |
String |
getState()
Returns a "State" name component. |
int |
getType()
Return type of GeneralName. |
int |
hashCode()
Calculates a hash code value for the object. |
String |
toString()
Returns a string form of the X.500 distinguished name. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final ObjectIdentifier commonName_oid
public static final ObjectIdentifier countryName_oid
public static final ObjectIdentifier localityName_oid
public static final ObjectIdentifier orgName_oid
public static final ObjectIdentifier orgUnitName_oid
public static final ObjectIdentifier stateName_oid
public static final ObjectIdentifier streetAddress_oid
public static final ObjectIdentifier title_oid
public static final ObjectIdentifier ipAddress_oid
Constructor Detail |
public X500Name(String dname) throws IOException
DN
- X.500 Distinguished Namepublic X500Name(String commonName, String organizationUnit, String organizationName, String country) throws IOException
NOTE: The behaviour when any of these strings contain characters outside the ASCII range is unspecified in currently relevant standards.
commonName
- common name of a person, e.g. "Vivette Davis"organizationUnit
- small organization name, e.g. "Purchasing"organizationName
- large organization name, e.g. "Onizuka, Inc."country
- two letter country code, e.g. "CH"public X500Name(String commonName, String organizationUnit, String organizationName, String localityName, String stateName, String country) throws IOException
NOTE: The behaviour when any of these strings contain characters outside the ASCII range is unspecified in currently relevant standards.
commonName
- common name of a person, e.g. "Vivette Davis"organizationUnit
- small organization name, e.g. "Purchasing"organizationName
- large organization name, e.g. "Onizuka, Inc."localityName
- locality (city) name, e.g. "Palo Alto"stateName
- state name, e.g. "California"country
- two letter country code, e.g. "CH"public X500Name(DerValue value) throws IOException
value
- a DER-encoded value holding an X.500 name.public X500Name(DerInputStream in) throws IOException
in
- DER-encoded data holding an X.500 name.public X500Name(byte[] name) throws IOException
name
- DER-encoded byte array holding an X.500 name.Method Detail |
public boolean equals(Object other)
public int hashCode()
public boolean equals(X500Name other)
public int getType()
public String getCountry() throws IOException
public String getOrganization() throws IOException
public String getOrganizationalUnit() throws IOException
public String getCommonName() throws IOException
public String getLocality() throws IOException
public String getState() throws IOException
public String toString()
public String getName()
public void emit(DerOutputStream out) throws IOException
out
- where to put the DER-encoded X.500 namepublic void encode(DerOutputStream out) throws IOException
out
- where to put the DER-encoded X.500 namepublic byte[] getEncoded() throws IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |