Bouncy Castle Cryptography 1.11 API Specification: Class X509Name
Bouncy Castle Cryptography 1.11

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 DERObjectIdentifier EmailAddress
          email address (RSA PKCS#9 extension) - IA5String
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.
static DERObjectIdentifier OU
          organizational unit name - StringType(SIZE(1..64))
static DERObjectIdentifier SN
          device serial number name - StringType(SIZE(1..64))
static DERObjectIdentifier ST
          state, or province name - StringType(SIZE(1..64))
static java.util.Hashtable SymbolLookUp
          look up table translating common symbols into their OIDS.
 
Constructor Summary
X509Name(DERConstructedSequence seq)
          Constructor from DERConstructedSequence.
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 ordering, java.util.Vector values)
          takes two vectors one of the oids and the other of the values.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 DERObject getDERObject()
           
 int hashCode()
           
 java.lang.String toString()
           
 
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))

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))

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.


DC

public static final DERObjectIdentifier DC

OIDLookUp

public static java.util.Hashtable OIDLookUp
look up table translating OID values into their common symbols.

SymbolLookUp

public static java.util.Hashtable SymbolLookUp
look up table translating common symbols into their OIDS.
Constructor Detail

X509Name

public X509Name(DERConstructedSequence seq)
Constructor from DERConstructedSequence. 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 ordering,
                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.
Method Detail

getDERObject

public DERObject getDERObject()
Specified by:
getDERObject in interface DEREncodable

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Bouncy Castle Cryptography 1.11