Package org.bouncycastle.asn1.x500.style
Class BCStyle
java.lang.Object
org.bouncycastle.asn1.x500.style.AbstractX500NameStyle
org.bouncycastle.asn1.x500.style.BCStyle
- All Implemented Interfaces:
X500NameStyle
- Direct Known Subclasses:
BCStrictStyle
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ASN1ObjectIdentifier
businessCategory - DirectoryString(SIZE(1..128)static final ASN1ObjectIdentifier
country code - StringType(SIZE(2))static final ASN1ObjectIdentifier
common name - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes onlystatic final ASN1ObjectIdentifier
RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes onlystatic final ASN1ObjectIdentifier
RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Zstatic final ASN1ObjectIdentifier
protected final Hashtable
protected final Hashtable
static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
RFC 2256 dmdNamestatic final ASN1ObjectIdentifier
dnQualifier - DirectoryString(SIZE(1..64)static final ASN1ObjectIdentifier
email address in Verisign certificatesstatic final ASN1ObjectIdentifier
Email address (RSA PKCS#9 extension) - IA5String.static final ASN1ObjectIdentifier
RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
static final X500NameStyle
Singleton instance.static final ASN1ObjectIdentifier
locality name - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
id-at-namestatic final ASN1ObjectIdentifier
ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)static final ASN1ObjectIdentifier
organization - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
id-at-organizationIdentifierstatic final ASN1ObjectIdentifier
organizational unit name - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)static final ASN1ObjectIdentifier
RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))static final ASN1ObjectIdentifier
postalCode - DirectoryString(SIZE(1..40)static final ASN1ObjectIdentifier
RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
device serial number name - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
Deprecated.use SERIALNUMBER or SURNAMEstatic final ASN1ObjectIdentifier
state, or province name - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
street - StringType(SIZE(1..64))static final ASN1ObjectIdentifier
Naming attributes of type X520namestatic final ASN1ObjectIdentifier
Titlestatic final ASN1ObjectIdentifier
id-at-telephoneNumberstatic final ASN1ObjectIdentifier
LDAP User id.static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
static final ASN1ObjectIdentifier
more from PKCS#9 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattrNameToOID
(String attrName) Return the OID associated with the passed in name.protected ASN1Encodable
encodeStringValue
(ASN1ObjectIdentifier oid, String value) Encoded every value into a UTF8String.RDN[]
fromString
(String dirName) Return an array of RDN generated from the passed in String.String[]
Return the acceptable names in a String DN that map to OID.Return the display name for toString() associated with the OID.Convert the passed in X500Name to a String.Methods inherited from class org.bouncycastle.asn1.x500.style.AbstractX500NameStyle
areEqual, calculateHashCode, copyHashTable, rdnAreEqual, stringToValue
-
Field Details
-
C
country code - StringType(SIZE(2)) -
O
organization - StringType(SIZE(1..64)) -
OU
organizational unit name - StringType(SIZE(1..64)) -
T
Title -
CN
common name - StringType(SIZE(1..64)) -
SN
Deprecated.use SERIALNUMBER or SURNAMEdevice serial number name - StringType(SIZE(1..64)) -
STREET
street - StringType(SIZE(1..64)) -
SERIALNUMBER
device serial number name - StringType(SIZE(1..64)) -
L
locality name - StringType(SIZE(1..64)) -
ST
state, or province name - StringType(SIZE(1..64)) -
SURNAME
Naming attributes of type X520name -
GIVENNAME
-
INITIALS
-
GENERATION
-
UNIQUE_IDENTIFIER
-
DESCRIPTION
-
BUSINESS_CATEGORY
businessCategory - DirectoryString(SIZE(1..128) -
POSTAL_CODE
postalCode - DirectoryString(SIZE(1..40) -
DN_QUALIFIER
dnQualifier - DirectoryString(SIZE(1..64) -
PSEUDONYM
RFC 3039 Pseudonym - DirectoryString(SIZE(1..64) -
ROLE
-
DATE_OF_BIRTH
RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z -
PLACE_OF_BIRTH
RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128) -
GENDER
RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f" -
COUNTRY_OF_CITIZENSHIP
RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only -
COUNTRY_OF_RESIDENCE
RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only -
NAME_AT_BIRTH
ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64) -
POSTAL_ADDRESS
RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30)) -
DMD_NAME
RFC 2256 dmdName -
TELEPHONE_NUMBER
id-at-telephoneNumber -
NAME
id-at-name -
ORGANIZATION_IDENTIFIER
id-at-organizationIdentifier -
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.
-
UnstructuredName
more from PKCS#9 -
UnstructuredAddress
-
E
email address in Verisign certificates -
DC
-
UID
LDAP User id. -
INSTANCE
Singleton instance. -
defaultLookUp
-
defaultSymbols
-
-
Constructor Details
-
BCStyle
protected BCStyle()
-
-
Method Details
-
encodeStringValue
Description copied from class:AbstractX500NameStyle
Encoded every value into a UTF8String.Subclasses should overwrite this method to change the encoding of specific types.
- Overrides:
encodeStringValue
in classAbstractX500NameStyle
- Parameters:
oid
- the DN oid of the valuevalue
- the String representation of the value- Returns:
- a the value encoded into a ASN.1 object. Never returns
null
.
-
oidToDisplayName
Description copied from interface:X500NameStyle
Return the display name for toString() associated with the OID.- Parameters:
oid
- the OID of interest.- Returns:
- the name displayed in toString(), null if no mapping provided.
-
oidToAttrNames
Description copied from interface:X500NameStyle
Return the acceptable names in a String DN that map to OID.- Parameters:
oid
- the OID of interest.- Returns:
- an array of String aliases for the OID, zero length if there are none.
-
attrNameToOID
Description copied from interface:X500NameStyle
Return the OID associated with the passed in name.- Parameters:
attrName
- the string to match.- Returns:
- an OID
-
fromString
Description copied from interface:X500NameStyle
Return an array of RDN generated from the passed in String.- Parameters:
dirName
- the String representation.- Returns:
- an array of corresponding RDNs.
-
toString
Description copied from interface:X500NameStyle
Convert the passed in X500Name to a String.- Parameters:
name
- the name to convert.- Returns:
- a String representation.
-