Attributes are additional information which can be inserted in a PKCS#10 certificate request. For example a "Driving License Certificate" could have the driving license number as an attribute.
Attributes are represented as a sequence of the attribute identifier (Object Identifier) and a set of DER encoded attribute values. ASN.1 definition of Attribute:
Attribute :: SEQUENCE {
type AttributeType,
values SET OF AttributeValue
}
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY defined by type
| Modifier and Type | Field and Description |
|---|---|
| protected ObjectIdentifier | |
| protected Object |
| Access | Constructor and Description |
|---|---|
| public | PKCS10Attribute(DerValue
the der encoded attribute. derVal)Constructs an attribute from a DER encoding. |
| public | PKCS10Attribute(ObjectIdentifier
the ObjectIdentifier of the attribute. attributeId, Object an instance of a class that implements
the attribute identified by the ObjectIdentifier. attributeValue)Constructs an attribute from individual components of ObjectIdentifier and the value (any java object). |
| public | PKCS10Attribute(PKCS9Attribute
the PKCS9Attribute to create from. attr)Constructs an attribute from PKCS9 attribute. |
| Modifier and Type | Method and Description |
|---|---|
| public void | encode(DerOutputStream
the DerOutputStream on which to write the DER encoding. out)Implements sun. DER encode this object onto an output stream. |
| public ObjectIdentifier | |
| public Object | |
| public String |
| attributeId | back to summary |
|---|---|
| protected ObjectIdentifier attributeId | |
| attributeValue | back to summary |
|---|---|
| protected Object attributeValue | |
| PKCS10Attribute | back to summary |
|---|---|
| public PKCS10Attribute(DerValue derVal) throws IOException Constructs an attribute from a DER encoding. This constructor expects the value to be encoded as defined above, i.e. a SEQUENCE of OID and SET OF value(s), not a literal X.509 v3 extension. Only PKCS9 defined attributes are supported currently.
| |
| PKCS10Attribute | back to summary |
|---|---|
| public PKCS10Attribute(ObjectIdentifier attributeId, Object attributeValue) Constructs an attribute from individual components of ObjectIdentifier and the value (any java object).
| |
| PKCS10Attribute | back to summary |
|---|---|
| public PKCS10Attribute(PKCS9Attribute attr) Constructs an attribute from PKCS9 attribute.
| |
| encode | back to summary |
|---|---|
| public void encode(DerOutputStream out) Implements sun. DER encode this object onto an output stream.
Implements the
| |
| getAttributeId | back to summary |
|---|---|
| public ObjectIdentifier getAttributeId() Returns the ObjectIdentifier of the attribute. | |
| getAttributeValue | back to summary |
|---|---|
| public Object getAttributeValue() Returns the attribute value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the attribute in user readable form. | |