Class X509Name
- All Implemented Interfaces:
ASN1Encodable
- Direct Known Subclasses:
X509Principal
public class X509Name extends ASN1Object
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
type OBJECT IDENTIFIER,
value ANY }
-
Field Summary
Fields Modifier and Type Field Description static ASN1ObjectIdentifierBUSINESS_CATEGORYDeprecated.businessCategory - DirectoryString(SIZE(1..128)static ASN1ObjectIdentifierCDeprecated.use a X500NameStylestatic ASN1ObjectIdentifierCNDeprecated.use a X500NameStylestatic ASN1ObjectIdentifierCOUNTRY_OF_CITIZENSHIPDeprecated.RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes onlystatic ASN1ObjectIdentifierCOUNTRY_OF_RESIDENCEDeprecated.RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes onlystatic ASN1ObjectIdentifierDATE_OF_BIRTHDeprecated.RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Zstatic ASN1ObjectIdentifierDCDeprecated.static HashtableDefaultLookUpDeprecated.look up table translating common symbols into their OIDS.static booleanDefaultReverseDeprecated.determines whether or not strings should be processed and printed from back to front.static HashtableDefaultSymbolsDeprecated.default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extrasstatic ASN1ObjectIdentifierDMD_NAMEDeprecated.RFC 2256 dmdNamestatic ASN1ObjectIdentifierDN_QUALIFIERDeprecated.dnQualifier - DirectoryString(SIZE(1..64)static ASN1ObjectIdentifierEDeprecated.email address in Verisign certificatesstatic ASN1ObjectIdentifierEmailAddressDeprecated.use a X500NameStylestatic ASN1ObjectIdentifierGENDERDeprecated.RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"static ASN1ObjectIdentifierGENERATIONDeprecated.static ASN1ObjectIdentifierGIVENNAMEDeprecated.static ASN1ObjectIdentifierINITIALSDeprecated.static ASN1ObjectIdentifierLDeprecated.locality name - StringType(SIZE(1..64))static ASN1ObjectIdentifierNAMEDeprecated.id-at-namestatic ASN1ObjectIdentifierNAME_AT_BIRTHDeprecated.ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)static ASN1ObjectIdentifierODeprecated.use a X500NameStylestatic HashtableOIDLookUpDeprecated.use DefaultSymbolsstatic ASN1ObjectIdentifierOUDeprecated.use a X500NameStylestatic ASN1ObjectIdentifierPLACE_OF_BIRTHDeprecated.RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)static ASN1ObjectIdentifierPOSTAL_ADDRESSDeprecated.RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))static ASN1ObjectIdentifierPOSTAL_CODEDeprecated.postalCode - DirectoryString(SIZE(1..40)static ASN1ObjectIdentifierPSEUDONYMDeprecated.RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)static HashtableRFC1779SymbolsDeprecated.look up table translating OID values into their common symbols following the convention in RFC 1779static HashtableRFC2253SymbolsDeprecated.look up table translating OID values into their common symbols following the convention in RFC 2253static ASN1ObjectIdentifierSERIALNUMBERDeprecated.device serial number name - StringType(SIZE(1..64))static ASN1ObjectIdentifierSNDeprecated.device serial number name - StringType(SIZE(1..64))static ASN1ObjectIdentifierSTDeprecated.state, or province name - StringType(SIZE(1..64))static ASN1ObjectIdentifierSTREETDeprecated.street - StringType(SIZE(1..64))static ASN1ObjectIdentifierSURNAMEDeprecated.Naming attributes of type X520namestatic HashtableSymbolLookUpDeprecated.use DefaultLookUpstatic ASN1ObjectIdentifierTDeprecated.use a X500NameStylestatic ASN1ObjectIdentifierTELEPHONE_NUMBERDeprecated.id-at-telephoneNumberstatic ASN1ObjectIdentifierUIDDeprecated.LDAP User id.static ASN1ObjectIdentifierUNIQUE_IDENTIFIERDeprecated.static ASN1ObjectIdentifierUnstructuredAddressDeprecated.static ASN1ObjectIdentifierUnstructuredNameDeprecated.more from PKCS#9 -
Constructor Summary
Constructors Modifier Constructor Description protectedX509Name()Deprecated.X509Name(boolean reverse, String dirName)Deprecated.use X500Name, X500NameBuilderX509Name(boolean reverse, String dirName, X509NameEntryConverter converter)Deprecated.use X500Name, X500NameBuilderX509Name(boolean reverse, Hashtable lookUp, String dirName)Deprecated.use X500Name, X500NameBuilderX509Name(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.X509Name(String dirName)Deprecated.use X500Name, X500NameBuilderX509Name(String dirName, X509NameEntryConverter converter)Deprecated.use X500Name, X500NameBuilderX509Name(Hashtable attributes)Deprecated.use an ordered constructor! The hashtable ordering is rarely correctX509Name(Vector ordering, Hashtable attributes)Deprecated.Constructor from a table of attributes with ordering.X509Name(Vector ordering, Hashtable attributes, X509NameEntryConverter converter)Deprecated.use X500Name, X500NameBuilderX509Name(Vector oids, Vector values)Deprecated.use X500Name, X500NameBuilderX509Name(Vector oids, Vector values, X509NameEntryConverter converter)Deprecated.use X500Name, X500NameBuilderX509Name(ASN1Sequence seq)Deprecated.use X500Name.getInstance() -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Deprecated.test for equality - note: case is ignored.booleanequals(Object obj, boolean inOrder)Deprecated.static X509NamegetInstance(Object obj)Deprecated.static X509NamegetInstance(ASN1TaggedObject obj, boolean explicit)Deprecated.Return a X509Name based on the passed in tagged object.VectorgetOIDs()Deprecated.return a vector of the oids in the name, in the order they were found.VectorgetValues()Deprecated.return a vector of the values found in the name, in the order they were found.VectorgetValues(ASN1ObjectIdentifier 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.inthashCode()Deprecated.Returns an integer hash code for this object.ASN1PrimitivetoASN1Primitive()Deprecated.StringtoString()Deprecated.Returns a string containing a concise, human-readable description of this object.StringtoString(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.Methods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
-
Field Details
-
C
Deprecated.use a X500NameStylecountry code - StringType(SIZE(2)) -
O
Deprecated.use a X500NameStyleorganization - StringType(SIZE(1..64)) -
OU
Deprecated.use a X500NameStyleorganizational unit name - StringType(SIZE(1..64)) -
T
Deprecated.use a X500NameStyleTitle -
CN
Deprecated.use a X500NameStylecommon name - StringType(SIZE(1..64)) -
SN
Deprecated.device serial number name - StringType(SIZE(1..64)) -
STREET
Deprecated.street - StringType(SIZE(1..64)) -
SERIALNUMBER
Deprecated.device serial number name - StringType(SIZE(1..64)) -
L
Deprecated.locality name - StringType(SIZE(1..64)) -
ST
Deprecated.state, or province name - StringType(SIZE(1..64)) -
SURNAME
Deprecated.Naming attributes of type X520name -
GIVENNAME
Deprecated. -
INITIALS
Deprecated. -
GENERATION
Deprecated. -
UNIQUE_IDENTIFIER
Deprecated. -
BUSINESS_CATEGORY
Deprecated.businessCategory - DirectoryString(SIZE(1..128) -
POSTAL_CODE
Deprecated.postalCode - DirectoryString(SIZE(1..40) -
DN_QUALIFIER
Deprecated.dnQualifier - DirectoryString(SIZE(1..64) -
PSEUDONYM
Deprecated.RFC 3039 Pseudonym - DirectoryString(SIZE(1..64) -
DATE_OF_BIRTH
Deprecated.RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z -
PLACE_OF_BIRTH
Deprecated.RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128) -
GENDER
Deprecated.RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f" -
COUNTRY_OF_CITIZENSHIP
Deprecated.RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only -
COUNTRY_OF_RESIDENCE
Deprecated.RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only -
NAME_AT_BIRTH
Deprecated.ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64) -
POSTAL_ADDRESS
Deprecated.RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30)) -
DMD_NAME
Deprecated.RFC 2256 dmdName -
TELEPHONE_NUMBER
Deprecated.id-at-telephoneNumber -
NAME
Deprecated.id-at-name -
EmailAddress
Deprecated.use a X500NameStyleEmail 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.
-
UnstructuredName
Deprecated.more from PKCS#9 -
UnstructuredAddress
Deprecated. -
E
Deprecated.email address in Verisign certificates -
DC
Deprecated. -
UID
Deprecated.LDAP User id. -
DefaultReverse
public static boolean DefaultReverseDeprecated.determines whether or not strings should be processed and printed from back to front. -
DefaultSymbols
Deprecated.default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras -
RFC2253Symbols
Deprecated.look up table translating OID values into their common symbols following the convention in RFC 2253 -
RFC1779Symbols
Deprecated.look up table translating OID values into their common symbols following the convention in RFC 1779 -
DefaultLookUp
Deprecated.look up table translating common symbols into their OIDS. -
OIDLookUp
Deprecated.use DefaultSymbolslook up table translating OID values into their common symbols -
SymbolLookUp
Deprecated.use DefaultLookUplook up table translating string values into their OIDS -
-
-
Constructor Details
-
X509Name
protected X509Name()Deprecated. -
X509Name
Deprecated.use X500Name.getInstance()Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair. -
X509Name
Deprecated.use an ordered constructor! The hashtable ordering is rarely correctconstructor 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
Deprecated.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
Deprecated.use X500Name, X500NameBuilderConstructor 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.
-
X509Name
Deprecated.use X500Name, X500NameBuilderTakes two vectors one of the oids and the other of the values. -
X509Name
Deprecated.use X500Name, X500NameBuilderTakes 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.
-
X509Name
Deprecated.use X500Name, X500NameBuilderTakes 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
Deprecated.use X500Name, X500NameBuilderTakes 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
Deprecated.use X500Name, X500NameBuilderTakes 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
Deprecated.use X500Name, X500NameBuilderTakes 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. -
X509Name
Deprecated.use X500Name, X500NameBuilderTakes 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 ASN1ObjectIdentifier, 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.
-
X509Name
public 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 ASN1ObjectIdentifier, 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 dirNameconverter- the converter to convert string values into their ASN.1 equivalents
-
-
Method Details
-
getInstance
Deprecated.Return a X509Name based on the passed in tagged object.- Parameters:
obj- tag object holding name.explicit- true if explicitly tagged false otherwise.- Returns:
- the X509Name
-
getInstance
Deprecated. -
getOIDs
Deprecated.return a vector of the oids in the name, in the order they were found. -
getValues
Deprecated.return a vector of the values found in the name, in the order they were found. -
getValues
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. -
toASN1Primitive
Deprecated.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object
-
equals
Deprecated.- Parameters:
inOrder- if true the order of both X509 names must be the same, as well as the values associated with each element.
-
hashCode
public int hashCode()Deprecated.Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Overrides:
hashCodein classASN1Object- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
equals
Deprecated.test for equality - note: case is ignored.- Overrides:
equalsin classASN1Object- Parameters:
obj- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
toString
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. 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
Deprecated.Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-