public class PKCS10Attribute extends java.lang.Object implements DerEncoder
Attributes are additonal 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 |
attributeId |
protected java.lang.Object |
attributeValue |
| Constructor and Description |
|---|
PKCS10Attribute(DerValue derVal)
Constructs an attribute from a DER encoding.
|
PKCS10Attribute(ObjectIdentifier attributeId,
java.lang.Object attributeValue)
Constructs an attribute from individual components of
ObjectIdentifier and the value (any java object).
|
PKCS10Attribute(PKCS9Attribute attr)
Constructs an attribute from PKCS9 attribute.
|
| Modifier and Type | Method and Description |
|---|---|
void |
derEncode(java.io.OutputStream out)
DER encode this object onto an output stream.
|
ObjectIdentifier |
getAttributeId()
Returns the ObjectIdentifier of the attribute.
|
java.lang.Object |
getAttributeValue()
Returns the attribute value.
|
java.lang.String |
toString()
Returns the attribute in user readable form.
|
protected ObjectIdentifier attributeId
protected java.lang.Object attributeValue
public PKCS10Attribute(DerValue derVal) throws java.io.IOException
derVal - the der encoded attribute.java.io.IOException - on parsing errors.public PKCS10Attribute(ObjectIdentifier attributeId, java.lang.Object attributeValue)
attributeId - the ObjectIdentifier of the attribute.attributeValue - an instance of a class that implements
the attribute identified by the ObjectIdentifier.public PKCS10Attribute(PKCS9Attribute attr)
attr - the PKCS9Attribute to create from.public void derEncode(java.io.OutputStream out)
throws java.io.IOException
DerEncoder interface.derEncode in interface DerEncoderout - the OutputStream on which to write the DER encoding.java.io.IOException - on encoding errors.public ObjectIdentifier getAttributeId()
public java.lang.Object getAttributeValue()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All Rights Reserved.