Home » geronimo-2.2-source-release » org.apache.geronimo.crypto.asn1.x509 » [javadoc | source]
org.apache.geronimo.crypto.asn1.x509
public class: X509Name [javadoc | source]
java.lang.Object
   org.apache.geronimo.crypto.asn1.ASN1Encodable
      org.apache.geronimo.crypto.asn1.x509.X509Name

All Implemented Interfaces:
    DEREncodable

Direct Known Subclasses:
    X509Principal

    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName

    RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue

    AttributeTypeAndValue ::= SEQUENCE {
                                  type  OBJECT IDENTIFIER,
                                  value ANY }
Field Summary
public static final  DERObjectIdentifier C    country code - StringType(SIZE(2)) 
public static final  DERObjectIdentifier O    organization - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier OU    organizational unit name - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier T    Title 
public static final  DERObjectIdentifier CN    common name - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier SN    device serial number name - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier L    locality name - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier ST    state, or province name - StringType(SIZE(1..64)) 
public static final  DERObjectIdentifier SURNAME    Naming attributes of type X520name 
public static final  DERObjectIdentifier GIVENNAME     
public static final  DERObjectIdentifier INITIALS     
public static final  DERObjectIdentifier GENERATION     
public static final  DERObjectIdentifier UNIQUE_IDENTIFIER     
public static final  DERObjectIdentifier EmailAddress    Email address (RSA PKCS#9 extension) - IA5String.

Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here. 

public static final  DERObjectIdentifier UnstructuredName    more from PKCS#9 
public static final  DERObjectIdentifier UnstructuredAddress     
public static final  DERObjectIdentifier E    email address in Verisign certificates 
public static final  DERObjectIdentifier DC     
public static final  DERObjectIdentifier UID    LDAP User id. 
public static  Hashtable OIDLookUp    look up table translating OID values into their common symbols - this static is scheduled for deletion 
public static  boolean DefaultReverse    determines whether or not strings should be processed and printed from back to front. 
public static  Hashtable DefaultSymbols    default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras 
public static  Hashtable RFC2253Symbols    look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras 
public static  Hashtable SymbolLookUp    look up table translating string values into their OIDS - this static is scheduled for deletion 
public static  Hashtable DefaultLookUp    look up table translating common symbols into their OIDS. 
Constructor:
 public X509Name(ASN1Sequence seq) 
    Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair.
 public X509Name(Hashtable attributes) 
    constructor from a table of attributes.

    it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process.

    Note: if the name you are trying to generate should be following a specific ordering, you should use the constructor with the ordering specified below.

 public X509Name(String dirName) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.
 public X509Name(Vector ordering,
    Hashtable attributes) 
    Constructor from a table of attributes with ordering.

    it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process. The ordering vector should contain the OIDs in the order they are meant to be encoded or printed in toString.

 public X509Name(Vector oids,
    Vector values) 
    Takes two vectors one of the oids and the other of the values.
 public X509Name(String dirName,
    X509NameEntryConverter converter) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter.
 public X509Name(boolean reverse,
    String dirName) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. If reverse is true, create the encoded version of the sequence starting from the last element in the string.
 public X509Name(Vector ordering,
    Hashtable attributes,
    X509DefaultEntryConverter converter) 
    Constructor from a table of attributes with ordering.

    it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process. The ordering vector should contain the OIDs in the order they are meant to be encoded or printed in toString.

    The passed in converter will be used to convert the strings into their ASN.1 counterparts.

 public X509Name(Vector oids,
    Vector values,
    X509NameEntryConverter converter) 
    Takes two vectors one of the oids and the other of the values.

    The passed in converter will be used to convert the strings into their ASN.1 counterparts.

 public X509Name(boolean reverse,
    String dirName,
    X509NameEntryConverter converter) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter. If reverse is true the ASN.1 sequence representing the DN will be built by starting at the end of the string, rather than the start.
 public X509Name(boolean reverse,
    Hashtable lookUp,
    String dirName) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. lookUp should provide a table of lookups, indexed by lowercase only strings and yielding a DERObjectIdentifier, other than that OID. and numeric oids will be processed automatically.
    If reverse is true, create the encoded version of the sequence starting from the last element in the string.
    Parameters:
    reverse - true if we should start scanning from the end (RFC 2553).
    lookUp - table of names and their oids.
    dirName - the X.500 string to be parsed.
 public X509Name(boolean reverse,
    Hashtable lookUp,
    String dirName,
    X509NameEntryConverter converter) 
    Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. lookUp should provide a table of lookups, indexed by lowercase only strings and yielding a DERObjectIdentifier, other than that OID. and numeric oids will be processed automatically. The passed in converter is used to convert the string values to the right of each equals sign to their ASN.1 counterparts.
    Parameters:
    reverse - true if we should start scanning from the end, false otherwise.
    lookUp - table of names and oids.
    dirName - the string dirName
    converter - the converter to convert string values into their ASN.1 equivalents
Method from org.apache.geronimo.crypto.asn1.x509.X509Name Summary:
equals,   equals,   getInstance,   getInstance,   getOIDs,   getValues,   hashCode,   toASN1Object,   toString,   toString
Methods from org.apache.geronimo.crypto.asn1.ASN1Encodable:
equals,   getDERObject,   getEncoded,   hashCode,   toASN1Object
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.crypto.asn1.x509.X509Name Detail:
 public boolean equals(Object _obj) 
    test for equality - note: case is ignored.
 public boolean equals(Object _obj,
    boolean inOrder) 
 public static X509Name getInstance(Object obj) 
 public static X509Name getInstance(ASN1TaggedObject obj,
    boolean explicit) 
    Return a X509Name based on the passed in tagged object.
 public Vector getOIDs() 
    return a vector of the oids in the name, in the order they were found.
 public Vector getValues() 
    return a vector of the values found in the name, in the order they were found.
 public int hashCode() 
 public DERObject toASN1Object() 
 public String toString() 
 public String toString(boolean reverse,
    Hashtable oidSymbols) 
    convert the structure to a string - if reverse is true the oids and values are listed out starting with the last element in the sequence (ala RFC 2253), otherwise the string will begin with the first element of the structure. If no string definition for the oid is found in oidSymbols the string value of the oid is added. Two standard symbol tables are provided DefaultSymbols, and RFC2253Symbols as part of this class.