Class BCStyle

    • Field Detail

      • OU

        public static final ASN1ObjectIdentifier OU
        organizational unit name - StringType(SIZE(1..64))
      • SN

        public static final ASN1ObjectIdentifier SN
        Deprecated.
        use SERIALNUMBER or SURNAME
        device serial number name - StringType(SIZE(1..64))
      • SERIALNUMBER

        public static final ASN1ObjectIdentifier SERIALNUMBER
        device serial number name - StringType(SIZE(1..64))
      • BUSINESS_CATEGORY

        public static final ASN1ObjectIdentifier BUSINESS_CATEGORY
        businessCategory - DirectoryString(SIZE(1..128)
      • POSTAL_CODE

        public static final ASN1ObjectIdentifier POSTAL_CODE
        postalCode - DirectoryString(SIZE(1..40)
      • DN_QUALIFIER

        public static final ASN1ObjectIdentifier DN_QUALIFIER
        dnQualifier - DirectoryString(SIZE(1..64)
      • PSEUDONYM

        public static final ASN1ObjectIdentifier PSEUDONYM
        RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
      • DATE_OF_BIRTH

        public static final ASN1ObjectIdentifier DATE_OF_BIRTH
        RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
      • PLACE_OF_BIRTH

        public static final ASN1ObjectIdentifier PLACE_OF_BIRTH
        RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
      • GENDER

        public static final ASN1ObjectIdentifier GENDER
        RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
      • COUNTRY_OF_CITIZENSHIP

        public static final ASN1ObjectIdentifier COUNTRY_OF_CITIZENSHIP
        RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only
      • COUNTRY_OF_RESIDENCE

        public static final ASN1ObjectIdentifier COUNTRY_OF_RESIDENCE
        RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only
      • NAME_AT_BIRTH

        public static final ASN1ObjectIdentifier NAME_AT_BIRTH
        ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
      • POSTAL_ADDRESS

        public static final ASN1ObjectIdentifier POSTAL_ADDRESS
        RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))
      • ORGANIZATION_IDENTIFIER

        public static final ASN1ObjectIdentifier ORGANIZATION_IDENTIFIER
        id-at-organizationIdentifier
      • EmailAddress

        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.

      • JURISDICTION_C

        public static final ASN1ObjectIdentifier JURISDICTION_C
        CA/Browser Forum https://cabforum.org/uploads/CA-Browser-Forum-BR-v2.0.0.pdf, Table 78
      • JURISDICTION_ST

        public static final ASN1ObjectIdentifier JURISDICTION_ST
        CA/Browser Forum https://cabforum.org/uploads/CA-Browser-Forum-BR-v2.0.0.pdf, Table 78
      • JURISDICTION_L

        public static final ASN1ObjectIdentifier JURISDICTION_L
        CA/Browser Forum https://cabforum.org/uploads/CA-Browser-Forum-BR-v2.0.0.pdf, Table 78
      • INSTANCE

        public static final X500NameStyle INSTANCE
        Singleton instance.
      • defaultLookUp

        protected final java.util.Hashtable defaultLookUp
      • defaultSymbols

        protected final java.util.Hashtable defaultSymbols
    • Constructor Detail

      • BCStyle

        protected BCStyle()
    • Method Detail

      • encodeStringValue

        protected ASN1Encodable encodeStringValue​(ASN1ObjectIdentifier oid,
                                                  java.lang.String value)
        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 class AbstractX500NameStyle
        Parameters:
        oid - the DN oid of the value
        value - the String representation of the value
        Returns:
        a the value encoded into a ASN.1 object. Never returns null.
      • oidToDisplayName

        public java.lang.String oidToDisplayName​(ASN1ObjectIdentifier oid)
        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

        public java.lang.String[] oidToAttrNames​(ASN1ObjectIdentifier oid)
        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

        public ASN1ObjectIdentifier attrNameToOID​(java.lang.String attrName)
        Description copied from interface: X500NameStyle
        Return the OID associated with the passed in name.
        Parameters:
        attrName - the string to match.
        Returns:
        an OID
      • fromString

        public RDN[] fromString​(java.lang.String dirName)
        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

        public java.lang.String toString​(X500Name name)
        Description copied from interface: X500NameStyle
        Convert the passed in X500Name to a String.
        Parameters:
        name - the name to convert.
        Returns:
        a String representation.