Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 public class BCStyle
     extends AbstractX500NameStyle
country code - StringType(SIZE(2))
     public static final ASN1ObjectIdentifier C = new ASN1ObjectIdentifier("");

organization - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier O = new ASN1ObjectIdentifier("");

organizational unit name - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier OU = new ASN1ObjectIdentifier("");

     public static final ASN1ObjectIdentifier T = new ASN1ObjectIdentifier("");

common name - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier CN = new ASN1ObjectIdentifier("");

device serial number name - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier SN = new ASN1ObjectIdentifier("");

street - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier STREET = new ASN1ObjectIdentifier("");

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

locality name - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier L = new ASN1ObjectIdentifier("");

state, or province name - StringType(SIZE(1..64))
     public static final ASN1ObjectIdentifier ST = new ASN1ObjectIdentifier("");

Naming attributes of type X520name
     public static final ASN1ObjectIdentifier SURNAME = new ASN1ObjectIdentifier("");
     public static final ASN1ObjectIdentifier GIVENNAME = new ASN1ObjectIdentifier("");
     public static final ASN1ObjectIdentifier INITIALS = new ASN1ObjectIdentifier("");
     public static final ASN1ObjectIdentifier GENERATION = new ASN1ObjectIdentifier("");
     public static final ASN1ObjectIdentifier UNIQUE_IDENTIFIER = new ASN1ObjectIdentifier("");

businessCategory - DirectoryString(SIZE(1..128)
     public static final ASN1ObjectIdentifier BUSINESS_CATEGORY = new ASN1ObjectIdentifier(

postalCode - DirectoryString(SIZE(1..40)
     public static final ASN1ObjectIdentifier POSTAL_CODE = new ASN1ObjectIdentifier(

dnQualifier - DirectoryString(SIZE(1..64)
     public static final ASN1ObjectIdentifier DN_QUALIFIER = new ASN1ObjectIdentifier(

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

RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
    public static final ASN1ObjectIdentifier DATE_OF_BIRTH = new ASN1ObjectIdentifier(

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

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

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

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

ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
    public static final ASN1ObjectIdentifier NAME_AT_BIRTH = new ASN1ObjectIdentifier("");

RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))
    public static final ASN1ObjectIdentifier POSTAL_ADDRESS = new ASN1ObjectIdentifier("");

RFC 2256 dmdName
    public static final ASN1ObjectIdentifier DMD_NAME = new ASN1ObjectIdentifier("");

    public static final ASN1ObjectIdentifier NAME = .;

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.

more from PKCS#9
email address in Verisign certificates
    public static final ASN1ObjectIdentifier E = ;
    * others...
    public static final ASN1ObjectIdentifier DC = new ASN1ObjectIdentifier("0.9.2342.19200300.100.1.25");

LDAP User id.
    public static final ASN1ObjectIdentifier UID = new ASN1ObjectIdentifier("0.9.2342.19200300.100.1.1");

default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras
    private static final Hashtable DefaultSymbols = new Hashtable();

look up table translating common symbols into their OIDS.
    private static final Hashtable DefaultLookUp = new Hashtable();

Singleton instance.
    public static final X500NameStyle INSTANCE = new BCStyle();
    protected final Hashtable defaultLookUp;
    protected final Hashtable defaultSymbols;
    protected BCStyle()
    		String value) {
    	if (oid.equals() || oid.equals())
            return new DERIA5String(value);
        else if (oid.equals())  // accept time string as well as # (for compatibility)
            return new ASN1GeneralizedTime(value);
        else if (oid.equals() || oid.equals() || oid.equals()
            || oid.equals())
            return new DERPrintableString(value);
    	return super.encodeStringValue(oidvalue);
        return (String).get(oid);
        return IETFUtils.findAttrNamesForOID(oid);
    public ASN1ObjectIdentifier attrNameToOID(String attrName)
        return IETFUtils.decodeAttrName(attrName);
    public RDN[] fromString(String dirName)
        return IETFUtils.rDNsFromString(dirNamethis);
    public String toString(X500Name name)
        StringBuffer buf = new StringBuffer();
        boolean first = true;
        RDN[] rdns = name.getRDNs();
        for (int i = 0; i < rdns.lengthi++)
            if (first)
                first = false;
            IETFUtils.appendRDN(bufrdns[i], );
        return buf.toString();
New to GrepCode? Check out our FAQ X