Top Fields Constructors Methods
org.bouncycastle.asn1.x500.style

public Class BCStyle

extends AbstractX500NameStyle
Class Inheritance
Known Direct Subclasses
org.bouncycastle.asn1.x500.style.BCStrictStyle
Imports
java.util.Hashtable, org.bouncycastle.asn1.ASN1Encodable, .ASN1GeneralizedTime, .ASN1ObjectIdentifier, .DERIA5String, .DERPrintableString, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x500.RDN, .X500Name, .X500NameStyle, org.bouncycastle.asn1.x509.X509ObjectIdentifiers

Field Summary

Modifier and TypeField and Description
public static final ASN1ObjectIdentifier
BUSINESS_CATEGORY

businessCategory - DirectoryString(SIZE(1..128)

public static final ASN1ObjectIdentifier
C

country code - StringType(SIZE(2))

public static final ASN1ObjectIdentifier
CN

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

public static final ASN1ObjectIdentifier
COUNTRY_OF_CITIZENSHIP

RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only

public static final ASN1ObjectIdentifier
COUNTRY_OF_RESIDENCE

RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only

public static final ASN1ObjectIdentifier
DATE_OF_BIRTH

RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z

public static final ASN1ObjectIdentifier
private static final Hashtable<K, V>
DefaultLookUp

look up table translating common symbols into their OIDS.

protected final Hashtable<K, V>
private static final Hashtable<K, V>
DefaultSymbols

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

protected final Hashtable<K, V>
public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
DMD_NAME

RFC 2256 dmdName

public static final ASN1ObjectIdentifier
DN_QUALIFIER

dnQualifier - DirectoryString(SIZE(1..64)

public static final ASN1ObjectIdentifier
E

email address in Verisign certificates

public static final ASN1ObjectIdentifier
EmailAddress

Email address (RSA PKCS#9 extension) - IA5String.

public static final ASN1ObjectIdentifier
GENDER

RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"

public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
public static final X500NameStyle
INSTANCE

Singleton instance.

public static final ASN1ObjectIdentifier
L

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

public static final ASN1ObjectIdentifier
NAME

id-at-name

public static final ASN1ObjectIdentifier
NAME_AT_BIRTH

ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)

public static final ASN1ObjectIdentifier
O

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

public static final ASN1ObjectIdentifier
ORGANIZATION_IDENTIFIER

id-at-organizationIdentifier

public static final ASN1ObjectIdentifier
OU

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

public static final ASN1ObjectIdentifier
PLACE_OF_BIRTH

RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)

public static final ASN1ObjectIdentifier
POSTAL_ADDRESS

RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))

public static final ASN1ObjectIdentifier
POSTAL_CODE

postalCode - DirectoryString(SIZE(1..40)

public static final ASN1ObjectIdentifier
PSEUDONYM

RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)

public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
SERIALNUMBER

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

public static final ASN1ObjectIdentifier
SN

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

public static final ASN1ObjectIdentifier
ST

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

public static final ASN1ObjectIdentifier
STREET

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

public static final ASN1ObjectIdentifier
SURNAME

Naming attributes of type X520name

public static final ASN1ObjectIdentifier
T

Title

public static final ASN1ObjectIdentifier
TELEPHONE_NUMBER

id-at-telephoneNumber

public static final ASN1ObjectIdentifier
UID

LDAP User id.

public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
UnstructuredName

more from PKCS#9

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public ASN1ObjectIdentifier
attrNameToOID(String
the string to match.
attrName
)

Implements org.bouncycastle.asn1.x500.X500NameStyle.attrNameToOID.

Return the OID associated with the passed in name.
protected ASN1Encodable
encodeStringValue(ASN1ObjectIdentifier
the DN oid of the value
oid
,
String
the String representation of the value
value
)

Overrides org.bouncycastle.asn1.x500.style.AbstractX500NameStyle.encodeStringValue.

Encoded every value into a UTF8String.
public RDN[]
fromString(String
the String representation.
dirName
)

Implements org.bouncycastle.asn1.x500.X500NameStyle.fromString.

Return an array of RDN generated from the passed in String.
public String[]
oidToAttrNames(ASN1ObjectIdentifier
the OID of interest.
oid
)

Implements org.bouncycastle.asn1.x500.X500NameStyle.oidToAttrNames.

Return the acceptable names in a String DN that map to OID.
public String
oidToDisplayName(ASN1ObjectIdentifier
the OID of interest.
oid
)

Implements org.bouncycastle.asn1.x500.X500NameStyle.oidToDisplayName.

Return the display name for toString() associated with the OID.
public String
toString(X500Name
the name to convert.
name
)

Implements org.bouncycastle.asn1.x500.X500NameStyle.toString.

Convert the passed in X500Name to a String.
Inherited from org.bouncycastle.asn1.x500.style.AbstractX500NameStyle:
areEqualcalculateHashCodecopyHashTablerdnAreEqualstringToValue

Field Detail

BUSINESS_CATEGORYback to summary
public static final ASN1ObjectIdentifier BUSINESS_CATEGORY

businessCategory - DirectoryString(SIZE(1..128)

Cback to summary
public static final ASN1ObjectIdentifier C

country code - StringType(SIZE(2))

CNback to summary
public static final ASN1ObjectIdentifier CN

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

COUNTRY_OF_CITIZENSHIPback to summary
public static final ASN1ObjectIdentifier COUNTRY_OF_CITIZENSHIP

RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only

COUNTRY_OF_RESIDENCEback to summary
public static final ASN1ObjectIdentifier COUNTRY_OF_RESIDENCE

RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only

DATE_OF_BIRTHback to summary
public static final ASN1ObjectIdentifier DATE_OF_BIRTH

RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z

DCback to summary
public static final ASN1ObjectIdentifier DC
DefaultLookUpback to summary
private static final Hashtable<K, V> DefaultLookUp

look up table translating common symbols into their OIDS.

defaultLookUpback to summary
protected final Hashtable<K, V> defaultLookUp
DefaultSymbolsback to summary
private static final Hashtable<K, V> DefaultSymbols

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

defaultSymbolsback to summary
protected final Hashtable<K, V> defaultSymbols
DESCRIPTIONback to summary
public static final ASN1ObjectIdentifier DESCRIPTION
DMD_NAMEback to summary
public static final ASN1ObjectIdentifier DMD_NAME

RFC 2256 dmdName

DN_QUALIFIERback to summary
public static final ASN1ObjectIdentifier DN_QUALIFIER

dnQualifier - DirectoryString(SIZE(1..64)

Eback to summary
public static final ASN1ObjectIdentifier E

email address in Verisign certificates

EmailAddressback to summary
public static final ASN1ObjectIdentifier 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.

GENDERback to summary
public static final ASN1ObjectIdentifier GENDER

RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"

GENERATIONback to summary
public static final ASN1ObjectIdentifier GENERATION
GIVENNAMEback to summary
public static final ASN1ObjectIdentifier GIVENNAME
INITIALSback to summary
public static final ASN1ObjectIdentifier INITIALS
INSTANCEback to summary
public static final X500NameStyle INSTANCE

Singleton instance.

Lback to summary
public static final ASN1ObjectIdentifier L

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

NAMEback to summary
public static final ASN1ObjectIdentifier NAME

id-at-name

NAME_AT_BIRTHback to summary
public static final ASN1ObjectIdentifier NAME_AT_BIRTH

ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)

Oback to summary
public static final ASN1ObjectIdentifier O

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

ORGANIZATION_IDENTIFIERback to summary
public static final ASN1ObjectIdentifier ORGANIZATION_IDENTIFIER

id-at-organizationIdentifier

OUback to summary
public static final ASN1ObjectIdentifier OU

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

PLACE_OF_BIRTHback to summary
public static final ASN1ObjectIdentifier PLACE_OF_BIRTH

RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)

POSTAL_ADDRESSback to summary
public static final ASN1ObjectIdentifier POSTAL_ADDRESS

RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))

POSTAL_CODEback to summary
public static final ASN1ObjectIdentifier POSTAL_CODE

postalCode - DirectoryString(SIZE(1..40)

PSEUDONYMback to summary
public static final ASN1ObjectIdentifier PSEUDONYM

RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)

ROLEback to summary
public static final ASN1ObjectIdentifier ROLE
SERIALNUMBERback to summary
public static final ASN1ObjectIdentifier SERIALNUMBER

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

SNback to summary
public static final ASN1ObjectIdentifier SN

Deprecated

use SERIALNUMBER or SURNAME

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

STback to summary
public static final ASN1ObjectIdentifier ST

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

STREETback to summary
public static final ASN1ObjectIdentifier STREET

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

SURNAMEback to summary
public static final ASN1ObjectIdentifier SURNAME

Naming attributes of type X520name

Tback to summary
public static final ASN1ObjectIdentifier T

Title

TELEPHONE_NUMBERback to summary
public static final ASN1ObjectIdentifier TELEPHONE_NUMBER

id-at-telephoneNumber

UIDback to summary
public static final ASN1ObjectIdentifier UID

LDAP User id.

UNIQUE_IDENTIFIERback to summary
public static final ASN1ObjectIdentifier UNIQUE_IDENTIFIER
UnstructuredAddressback to summary
public static final ASN1ObjectIdentifier UnstructuredAddress
UnstructuredNameback to summary
public static final ASN1ObjectIdentifier UnstructuredName

more from PKCS#9

Constructor Detail

BCStyleback to summary
protected BCStyle()

Method Detail

attrNameToOIDback to summary
public ASN1ObjectIdentifier attrNameToOID(String attrName)

Implements org.bouncycastle.asn1.x500.X500NameStyle.attrNameToOID.

Doc from org.bouncycastle.asn1.x500.X500NameStyle.attrNameToOID.

Return the OID associated with the passed in name.

Parameters
attrName:String

the string to match.

Returns:ASN1ObjectIdentifier

an OID

encodeStringValueback to summary
protected ASN1Encodable encodeStringValue(ASN1ObjectIdentifier oid, String value)

Overrides org.bouncycastle.asn1.x500.style.AbstractX500NameStyle.encodeStringValue.

Doc from org.bouncycastle.asn1.x500.style.AbstractX500NameStyle.encodeStringValue.

Encoded every value into a UTF8String.

Subclasses should overwrite this method to change the encoding of specific types.

Parameters
oid:ASN1ObjectIdentifier

the DN oid of the value

value:String

the String representation of the value

Returns:ASN1Encodable

a the value encoded into a ASN.1 object. Never returns null.

fromStringback to summary
public RDN[] fromString(String dirName)

Implements org.bouncycastle.asn1.x500.X500NameStyle.fromString.

Doc from org.bouncycastle.asn1.x500.X500NameStyle.fromString.

Return an array of RDN generated from the passed in String.

Parameters
dirName:String

the String representation.

Returns:RDN[]

an array of corresponding RDNs.

oidToAttrNamesback to summary
public String[] oidToAttrNames(ASN1ObjectIdentifier oid)

Implements org.bouncycastle.asn1.x500.X500NameStyle.oidToAttrNames.

Doc from org.bouncycastle.asn1.x500.X500NameStyle.oidToAttrNames.

Return the acceptable names in a String DN that map to OID.

Parameters
oid:ASN1ObjectIdentifier

the OID of interest.

Returns:String[]

an array of String aliases for the OID, zero length if there are none.

oidToDisplayNameback to summary
public String oidToDisplayName(ASN1ObjectIdentifier oid)

Implements org.bouncycastle.asn1.x500.X500NameStyle.oidToDisplayName.

Doc from org.bouncycastle.asn1.x500.X500NameStyle.oidToDisplayName.

Return the display name for toString() associated with the OID.

Parameters
oid:ASN1ObjectIdentifier

the OID of interest.

Returns:String

the name displayed in toString(), null if no mapping provided.

toStringback to summary
public String toString(X500Name name)

Implements org.bouncycastle.asn1.x500.X500NameStyle.toString.

Doc from org.bouncycastle.asn1.x500.X500NameStyle.toString.

Convert the passed in X500Name to a String.

Parameters
name:X500Name

the name to convert.

Returns:String

a String representation.