Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.24
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1.x509
Class X509Name

    java.lang.Object
      org.bouncycastle.asn1.x509.X509Name

All Implemented Interfaces:
  DEREncodable

Direct Known Subclasses:
  X509Principal

public class X509Name
extends java.lang.Object
implements DEREncodable

Field Summary
`static DERObjectIdentifier` | `C` country code - StringType(SIZE(2))
`static DERObjectIdentifier` | `CN` common name - StringType(SIZE(1..64))
`static DERObjectIdentifier` | `DC`
`static java.util.Hashtable` | `DefaultLookUp` look up table translating common symbols into their OIDS.
`static boolean` | `DefaultReverse` determines whether or not strings should be processed and printed from back to front.
`static java.util.Hashtable` | `DefaultSymbols` default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras
`static DERObjectIdentifier` | `E` email address in Verisign certificates
`static DERObjectIdentifier` | `EmailAddress` Email address (RSA PKCS#9 extension) - IA5String.
`static DERObjectIdentifier` | `GENERATION`
`static DERObjectIdentifier` | `GIVENNAME`
`static DERObjectIdentifier` | `INITIALS`
`static DERObjectIdentifier` | `L` locality name - StringType(SIZE(1..64))
`static DERObjectIdentifier` | `O` organization - StringType(SIZE(1..64))
`static java.util.Hashtable` | `OIDLookUp` look up table translating OID values into their common symbols - this static is scheduled for deletion
`static DERObjectIdentifier` | `OU` organizational unit name - StringType(SIZE(1..64))
`static java.util.Hashtable` | `RFC2253Symbols` look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras
`static DERObjectIdentifier` | `SN` device serial number name - StringType(SIZE(1..64))
`static DERObjectIdentifier` | `ST` state, or province name - StringType(SIZE(1..64))
`static DERObjectIdentifier` | `SURNAME` Naming attributes of type X520name
`static java.util.Hashtable` | `SymbolLookUp` look up table translating string values into their OIDS - this static is scheduled for deletion
`static DERObjectIdentifier` | `T` Title
`static DERObjectIdentifier` | `UID` LDAP User id.
`static DERObjectIdentifier` | `UNIQUE_IDENTIFIER`

Constructor Summary
`X509Name(ASN1Sequence seq)` Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair.
`X509Name(boolean reverse, java.util.Hashtable lookUp, java.lang.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.
`X509Name(boolean reverse, java.lang.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.
`X509Name(java.util.Hashtable attributes)` constructor from a table of attributes.
`X509Name(java.lang.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.
`X509Name(java.util.Vector ordering, java.util.Hashtable attributes)` Constructor from a table of attributes with ordering.
`X509Name(java.util.Vector oids, java.util.Vector values)` Takes two vectors one of the oids and the other of the values.

Method Summary
`boolean` | `equals(java.lang.Object _obj)` test for equality - note: case is ignored.
`boolean` | `equals(java.lang.Object _obj, boolean inOrder)`
`DERObject` | `getDERObject()`
`static X509Name` | `getInstance(ASN1TaggedObject obj, boolean explicit)`
`static X509Name` | `getInstance(java.lang.Object obj)`
`java.util.Vector` | `getOIDs()` return a vector of the oids in the name, in the order they were found.
`java.util.Vector` | `getValues()` return a vector of the values found in the name, in the order they were found.
`int` | `hashCode()`
`java.lang.String` | `toString()`
`java.lang.String` | `toString(boolean reverse, java.util.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.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### C

    public static final DERObjectIdentifier C

  country code - StringType(SIZE(2))

### O

    public static final DERObjectIdentifier O

  organization - StringType(SIZE(1..64))

### OU

    public static final DERObjectIdentifier OU

  organizational unit name - StringType(SIZE(1..64))

### T

    public static final DERObjectIdentifier T

  Title

### CN

    public static final DERObjectIdentifier CN

  common name - StringType(SIZE(1..64))

### SN

    public static final DERObjectIdentifier SN

  device serial number name - StringType(SIZE(1..64))

### L

    public static final DERObjectIdentifier L

  locality name - StringType(SIZE(1..64))

### ST

    public static final DERObjectIdentifier ST

  state, or province name - StringType(SIZE(1..64))

### SURNAME

    public static final DERObjectIdentifier SURNAME

  Naming attributes of type X520name

### GIVENNAME

    public static final DERObjectIdentifier GIVENNAME

### INITIALS

    public static final DERObjectIdentifier INITIALS

### GENERATION

    public static final DERObjectIdentifier GENERATION

### UNIQUE_IDENTIFIER

    public static final DERObjectIdentifier UNIQUE_IDENTIFIER

### EmailAddress

    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.

### E

    public static final DERObjectIdentifier E

  email address in Verisign certificates

### DC

    public static final DERObjectIdentifier DC

### UID

    public static final DERObjectIdentifier UID

  LDAP User id.

### OIDLookUp

    public static java.util.Hashtable OIDLookUp

  look up table translating OID values into their common symbols - this static is scheduled for deletion

### DefaultReverse

    public static boolean DefaultReverse

  determines whether or not strings should be processed and printed from back to front.

### DefaultSymbols

    public static java.util.Hashtable DefaultSymbols

  default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras

### RFC2253Symbols

    public static java.util.Hashtable RFC2253Symbols

  look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras

### SymbolLookUp

    public static java.util.Hashtable SymbolLookUp

  look up table translating string values into their OIDS - this static is scheduled for deletion

### DefaultLookUp

    public static java.util.Hashtable DefaultLookUp

  look up table translating common symbols into their OIDS.

Constructor Detail

### X509Name

    public X509Name(ASN1Sequence seq)

  Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair.

### X509Name

    public X509Name(java.util.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.

### X509Name

    public X509Name(java.util.Vector ordering,
                    java.util.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.

### X509Name

    public X509Name(java.util.Vector oids,
                    java.util.Vector values)

  Takes two vectors one of the oids and the other of the values.

### X509Name

    public X509Name(java.lang.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.

### X509Name

    public X509Name(boolean reverse,
                    java.lang.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.

### X509Name

    public X509Name(boolean reverse,
                    java.util.Hashtable lookUp,
                    java.lang.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.

Method Detail

### getInstance

    public static X509Name getInstance(ASN1TaggedObject obj,
                                       boolean explicit)

### getInstance

    public static X509Name getInstance(java.lang.Object obj)

### getOIDs

    public java.util.Vector getOIDs()

  return a vector of the oids in the name, in the order they were found.

### getValues

    public java.util.Vector getValues()

  return a vector of the values found in the name, in the order they were found.

### getDERObject

    public DERObject getDERObject()

  Specified by:
    `getDERObject` in interface `DEREncodable`

### equals

    public boolean equals(java.lang.Object _obj,
                          boolean inOrder)

  Parameters:
    `inOrder` - if true the order of both X509 names must be the same, as well as the values associated with each element.

### equals

    public boolean equals(java.lang.Object _obj)

  test for equality - note: case is ignored.

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString(boolean reverse,
                                     java.util.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.

  Parameters:
    `reverse` - if true start at the end of the sequence and work back.
    `oidSymbols` - look up table strings for oids.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.24
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD