Class Attribute

java.lang.Object
org.mozilla.jss.netscape.security.x509.Attribute
All Implemented Interfaces:
Serializable, DerEncoder

public final class Attribute extends Object implements Serializable, DerEncoder
An attribute, as identified by some attribute ID, has some particular values. Values are as a rule ASN.1 printable strings. A conventional set of type IDs is recognized when parsing. The following shows the syntax:

    Attribute   ::= SEQUENCE {
 type           AttributeType,
        value           SET OF AttributeValue
                -- at least one value is required --}

    AttributeType       ::= OBJECT IDENTIFIER

    AttributeValue      ::= ANY

 
Refer to draft-ietf-pkix-ipki-part1-11 for the support attributes listed on page 96 of the internet draft. The are listed here for easy reference: name, common name, surname, given name, initials, generation qualifier, dn qualifier, country name, locality name, state or province name, organization name, organization unit name, title, pkcs9 email. Not all the attributes are supported. Please check the X500NameAttrMap for defined attributes.
See Also:
  • Field Details

  • Constructor Details

    • Attribute

      public Attribute(ObjectIdentifier oid, String value) throws IOException
      Construct an attribute from attribute type and attribute value
      Parameters:
      oid - the object identifier of the attribute type
      value - the value string
      Throws:
      IOException
    • Attribute

      public Attribute(ObjectIdentifier oid, Vector<String> values) throws IOException
      Construct an attribute from attribute type and attribute values
      Parameters:
      oid - the object identifier of the attribute type
      values - String value vector
      Throws:
      IOException
    • Attribute

      public Attribute(String attr, Vector<String> values) throws IOException
      Construct an attribute from attribute type and attribute values
      Parameters:
      attr - oid attribute type string CN,OU,O,C,L,TITLE,ST,STREET,UID,MAIL,E,DC
      values - String value vector
      Throws:
      IOException
    • Attribute

      public Attribute(DerValue val) throws IOException
      Construct an attribute from a der encoded object. This der der encoded value should represent the attribute object.
      Parameters:
      val - the attribute object in der encode form.
      Throws:
      IOException
  • Method Details