public class X509Name extends ASN1Encodable
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type OBJECT IDENTIFIER, value ANY }
Modifier and Type | Field and Description |
---|---|
static DERObjectIdentifier |
BUSINESS_CATEGORY
Deprecated.
businessCategory - DirectoryString(SIZE(1..128)
|
static DERObjectIdentifier |
C
Deprecated.
country code - StringType(SIZE(2))
|
static DERObjectIdentifier |
CN
Deprecated.
common name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
COUNTRY_OF_CITIZENSHIP
Deprecated.
RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
codes only
|
static DERObjectIdentifier |
COUNTRY_OF_RESIDENCE
Deprecated.
RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166
codes only
|
static DERObjectIdentifier |
DATE_OF_BIRTH
Deprecated.
RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
|
static DERObjectIdentifier |
DC
Deprecated.
|
static Hashtable |
DefaultLookUp
Deprecated.
look up table translating common symbols into their OIDS.
|
static boolean |
DefaultReverse
Deprecated.
determines whether or not strings should be processed and printed
from back to front.
|
static Hashtable |
DefaultSymbols
Deprecated.
default look up table translating OID values into their common symbols following
the convention in RFC 2253 with a few extras
|
static DERObjectIdentifier |
DMD_NAME
Deprecated.
RFC 2256 dmdName
|
static DERObjectIdentifier |
DN_QUALIFIER
Deprecated.
dnQualifier - DirectoryString(SIZE(1..64)
|
static DERObjectIdentifier |
E
Deprecated.
email address in Verisign certificates
|
static DERObjectIdentifier |
EmailAddress
Deprecated.
Email address (RSA PKCS#9 extension) - IA5String.
|
static DERObjectIdentifier |
GENDER
Deprecated.
RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
|
static DERObjectIdentifier |
GENERATION
Deprecated.
|
static DERObjectIdentifier |
GIVENNAME
Deprecated.
|
static DERObjectIdentifier |
INITIALS
Deprecated.
|
static DERObjectIdentifier |
L
Deprecated.
locality name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
NAME
Deprecated.
id-at-name
|
static DERObjectIdentifier |
NAME_AT_BIRTH
Deprecated.
ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
|
static DERObjectIdentifier |
O
Deprecated.
organization - StringType(SIZE(1..64))
|
static Hashtable |
OIDLookUp
Deprecated.
use DefaultSymbols
|
static DERObjectIdentifier |
OU
Deprecated.
organizational unit name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
PLACE_OF_BIRTH
Deprecated.
RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
|
static DERObjectIdentifier |
POSTAL_ADDRESS
Deprecated.
RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
DirectoryString(SIZE(1..30))
|
static DERObjectIdentifier |
POSTAL_CODE
Deprecated.
postalCode - DirectoryString(SIZE(1..40)
|
static DERObjectIdentifier |
PSEUDONYM
Deprecated.
RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
|
static Hashtable |
RFC1779Symbols
Deprecated.
look up table translating OID values into their common symbols following the convention in RFC 1779
|
static Hashtable |
RFC2253Symbols
Deprecated.
look up table translating OID values into their common symbols following the convention in RFC 2253
|
static DERObjectIdentifier |
SERIALNUMBER
Deprecated.
device serial number name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
SN
Deprecated.
device serial number name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
ST
Deprecated.
state, or province name - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
STREET
Deprecated.
street - StringType(SIZE(1..64))
|
static DERObjectIdentifier |
SURNAME
Deprecated.
Naming attributes of type X520name
|
static Hashtable |
SymbolLookUp
Deprecated.
use DefaultLookUp
|
static DERObjectIdentifier |
T
Deprecated.
Title
|
static DERObjectIdentifier |
TELEPHONE_NUMBER
Deprecated.
id-at-telephoneNumber
|
static DERObjectIdentifier |
UID
Deprecated.
LDAP User id.
|
static DERObjectIdentifier |
UNIQUE_IDENTIFIER
Deprecated.
|
static DERObjectIdentifier |
UnstructuredAddress
Deprecated.
|
static DERObjectIdentifier |
UnstructuredName
Deprecated.
more from PKCS#9
|
BER, DER
Modifier | Constructor and Description |
---|---|
protected |
X509Name()
Deprecated.
|
|
X509Name(ASN1Sequence seq)
Deprecated.
Constructor from ASN1Sequence
the principal will be a list of constructed sets, each containing an (OID, String) pair.
|
|
X509Name(boolean reverse,
Hashtable lookUp,
String dirName)
Deprecated.
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,
Hashtable lookUp,
String dirName,
X509NameEntryConverter converter)
Deprecated.
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,
String dirName)
Deprecated.
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(boolean reverse,
String dirName,
X509NameEntryConverter converter)
Deprecated.
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.
|
|
X509Name(Hashtable attributes)
Deprecated.
use an ordered constructor! The hashtable ordering is rarely correct
|
|
X509Name(String dirName)
Deprecated.
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(String dirName,
X509NameEntryConverter converter)
Deprecated.
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.
|
|
X509Name(Vector ordering,
Hashtable attributes)
Deprecated.
Constructor from a table of attributes with ordering.
|
|
X509Name(Vector ordering,
Hashtable attributes,
X509NameEntryConverter converter)
Deprecated.
Constructor from a table of attributes with ordering.
|
|
X509Name(Vector oids,
Vector values)
Deprecated.
Takes two vectors one of the oids and the other of the values.
|
|
X509Name(Vector oids,
Vector values,
X509NameEntryConverter converter)
Deprecated.
Takes two vectors one of the oids and the other of the values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Deprecated.
test for equality - note: case is ignored.
|
boolean |
equals(Object obj,
boolean inOrder)
Deprecated.
|
static X509Name |
getInstance(ASN1TaggedObject obj,
boolean explicit)
Deprecated.
Return a X509Name based on the passed in tagged object.
|
static X509Name |
getInstance(Object obj)
Deprecated.
|
Vector |
getOIDs()
Deprecated.
return a vector of the oids in the name, in the order they were found.
|
Vector |
getValues()
Deprecated.
return a vector of the values found in the name, in the order they
were found.
|
Vector |
getValues(DERObjectIdentifier oid)
Deprecated.
return a vector of the values found in the name, in the order they
were found, with the DN label corresponding to passed in oid.
|
int |
hashCode()
Deprecated.
|
DERObject |
toASN1Object()
Deprecated.
|
String |
toString()
Deprecated.
|
String |
toString(boolean reverse,
Hashtable oidSymbols)
Deprecated.
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.
|
getDEREncoded, getDERObject, getEncoded, getEncoded
public static final DERObjectIdentifier C
public static final DERObjectIdentifier O
public static final DERObjectIdentifier OU
public static final DERObjectIdentifier T
public static final DERObjectIdentifier CN
public static final DERObjectIdentifier SN
public static final DERObjectIdentifier STREET
public static final DERObjectIdentifier SERIALNUMBER
public static final DERObjectIdentifier L
public static final DERObjectIdentifier ST
public static final DERObjectIdentifier SURNAME
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 BUSINESS_CATEGORY
public static final DERObjectIdentifier POSTAL_CODE
public static final DERObjectIdentifier DN_QUALIFIER
public static final DERObjectIdentifier PSEUDONYM
public static final DERObjectIdentifier DATE_OF_BIRTH
public static final DERObjectIdentifier PLACE_OF_BIRTH
public static final DERObjectIdentifier GENDER
public static final DERObjectIdentifier COUNTRY_OF_CITIZENSHIP
public static final DERObjectIdentifier COUNTRY_OF_RESIDENCE
public static final DERObjectIdentifier NAME_AT_BIRTH
public static final DERObjectIdentifier POSTAL_ADDRESS
public static final DERObjectIdentifier DMD_NAME
public static final DERObjectIdentifier TELEPHONE_NUMBER
public static final DERObjectIdentifier NAME
public static final DERObjectIdentifier EmailAddress
Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
public static final DERObjectIdentifier UnstructuredName
public static final DERObjectIdentifier UnstructuredAddress
public static final DERObjectIdentifier E
public static final DERObjectIdentifier DC
public static final DERObjectIdentifier UID
public static boolean DefaultReverse
public static final Hashtable DefaultSymbols
public static final Hashtable RFC2253Symbols
public static final Hashtable RFC1779Symbols
public static final Hashtable DefaultLookUp
public static final Hashtable OIDLookUp
public static final Hashtable SymbolLookUp
protected X509Name()
public X509Name(ASN1Sequence seq)
public X509Name(Hashtable 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(Vector ordering, Hashtable 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. The ordering vector should contain the OIDs in the order they are meant to be encoded or printed in toString.
public X509Name(Vector ordering, Hashtable attributes, X509NameEntryConverter converter)
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)
public X509Name(Vector oids, Vector values, X509NameEntryConverter converter)
The passed in converter will be used to convert the strings into their ASN.1 counterparts.
public X509Name(String dirName)
public X509Name(String dirName, X509NameEntryConverter converter)
public X509Name(boolean reverse, String dirName)
public X509Name(boolean reverse, String dirName, X509NameEntryConverter converter)
public X509Name(boolean reverse, Hashtable lookUp, String dirName)
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)
reverse
- true if we should start scanning from the end, false otherwise.lookUp
- table of names and oids.dirName
- the string dirNameconverter
- the converter to convert string values into their ASN.1 equivalentspublic static X509Name getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- tag object holding name.explicit
- true if explicitly tagged false otherwise.public Vector getOIDs()
public Vector getValues()
public Vector getValues(DERObjectIdentifier oid)
public DERObject toASN1Object()
toASN1Object
in class ASN1Encodable
public boolean equals(Object obj, boolean inOrder)
inOrder
- if true the order of both X509 names must be the same,
as well as the values associated with each element.public int hashCode()
hashCode
in class ASN1Encodable
public boolean equals(Object obj)
equals
in class ASN1Encodable
public String toString(boolean reverse, Hashtable oidSymbols)
reverse
- if true start at the end of the sequence and work back.oidSymbols
- look up table strings for oids.Copyright © 2015. All rights reserved.