|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.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.
X500Name objects are immutable; they cannot be changed once created.
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 |
dnQualifier_oid
OID for the "=" attribute, denoting a person's initials. |
static ObjectIdentifier |
domainComponent_oid
OID for the "DC=" attribute, denoting an entry's domain component. |
static ObjectIdentifier |
emailAddress_oid
OID for the "EMAIL=" attribute, denoting a person's email address. |
static ObjectIdentifier |
generationQualifier_oid
OID for the "GENERATION=" attribute. |
static ObjectIdentifier |
givenName_oid
OID for the "=" attribute, denoting a person's given name. |
static ObjectIdentifier |
initials_oid
OID for the "=" attribute, denoting a person's initials. |
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 |
postalCode_oid
OID for the "POSTALCODE=" attribute, denoting a postal code. |
static ObjectIdentifier |
serialNumber_oid
OID for the "serialNumber=" attribute, denoting a person's serial number. |
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 |
surName_oid
OID for the "=" attribute, denoting a person's surname. |
static ObjectIdentifier |
title_oid
OID for the "T=" attribute, denoting a person's title. |
static ObjectIdentifier |
userid_oid
OID for the "UID=" attribute, denoting an entry's user ID. |
Constructor Summary | |
X500Name(byte[] name)
Constructs a name from an ASN.1 encoded byte array. |
|
X500Name(com.ibm.security.util.DerInputStream in)
Constructs a name from an ASN.1 encoded input stream. |
|
X500Name(com.ibm.security.util.DerValue value)
Constructs a name from an ASN.1 encoded value. |
|
X500Name(com.ibm.security.x509.RDN[] rdns)
|
|
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 country,
String emailAddress)
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. |
|
X500Name(String commonName,
String organizationUnit,
String organizationName,
String localityName,
String stateName,
String postalCode,
String country)
Constructs a name from fields common in Internet application environments. |
Method Summary | |
void |
emit(com.ibm.security.util.DerOutputStream out)
Deprecated. Use encode() instead |
void |
encode(com.ibm.security.util.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. |
String |
getEmail()
Returns a "Email" 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. |
X500Name |
getParentDn()
|
String |
getPostalCode()
Returns a "postalCode" component. |
com.ibm.security.x509.RDN |
getRDN(int index)
|
String |
getRFC1779Name()
Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 1779. |
String |
getRFC2253CanonicalName()
|
String |
getRFC2253Name()
Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 2253. |
String |
getState()
Returns a "State" name component. |
int |
getType()
Return type of GeneralName. |
int |
hashCode()
Calculates a hash code value for the object. |
boolean |
isAbove(X500Name other)
|
int |
size()
|
String |
toString()
Returns a string form of the X.500 distinguished name. |
Field Detail |
public static ObjectIdentifier emailAddress_oid
public static ObjectIdentifier postalCode_oid
public static ObjectIdentifier serialNumber_oid
public static ObjectIdentifier commonName_oid
public static ObjectIdentifier countryName_oid
public static ObjectIdentifier localityName_oid
public static ObjectIdentifier orgName_oid
public static ObjectIdentifier orgUnitName_oid
public static ObjectIdentifier stateName_oid
public static ObjectIdentifier streetAddress_oid
public static ObjectIdentifier title_oid
public static ObjectIdentifier surName_oid
public static ObjectIdentifier givenName_oid
public static ObjectIdentifier initials_oid
public static ObjectIdentifier ipAddress_oid
public static ObjectIdentifier dnQualifier_oid
public static ObjectIdentifier domainComponent_oid
public static ObjectIdentifier generationQualifier_oid
public static ObjectIdentifier userid_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 country, String emailAddress) 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"emailAddress
- email address string, e.g. "javauser@us.ibm.com"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(String commonName, String organizationUnit, String organizationName, String localityName, String stateName, String postalCode, 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"postalCode
- the zip code in the United States.country
- two letter country code, e.g. "CH"public X500Name(com.ibm.security.util.DerValue value) throws IOException
value
- a DER-encoded value holding an X.500 name.public X500Name(com.ibm.security.util.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.public X500Name(com.ibm.security.x509.RDN[] rdns)
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 getEmail() throws IOException
public String getPostalCode() throws IOException
public String toString()
public String getName()
public void emit(com.ibm.security.util.DerOutputStream out) throws IOException
out
- where to put the DER-encoded X.500 namepublic void encode(com.ibm.security.util.DerOutputStream out) throws IOException
out
- where to put the DER-encoded X.500 namepublic byte[] getEncoded() throws IOException
public int size()
public com.ibm.security.x509.RDN getRDN(int index)
public X500Name getParentDn()
public String getRFC1779Name()
public String getRFC2253Name()
public String getRFC2253CanonicalName()
public boolean isAbove(X500Name other)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |