Class C509Attribute

java.lang.Object
org.bouncycastle.cbor.c509.C509Attribute

public class C509Attribute extends Object
A single C509 certification request attribute (Section 4.3 of draft-ietf-cose-cbor-encoded-cert-20):
CRAttribute = ( ( attributeType: int, attributeValue: Defined ) //
                ( attributeType: ~oid, attributeValue: bytes ) )
The C509 CR Attributes Registry (Section 8.7) defines values 0 (extensionRequest), 1 (challengePassword) and 2 (privateKeyPossessionStatement). For the generic ~oid form the value byte string carries the DER encoding of the single attribute value.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Challenge Password (1.2.840.113549.1.9.7), RFC 2985.
    static final int
    Extension Request (1.2.840.113549.1.9.14), RFC 2985.
    static final int
    Private Key Possession Statement (1.3.6.1.4.1.22112.2.1), RFC 9883.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.asn1.ASN1ObjectIdentifier
    Return the attribute's object identifier - resolved from the registry for the int-coded form.
    Return the C509 CR Attributes Registry value when this attribute is carried in the int-coded form, or null when it uses the generic ~oid form.
    byte[]
    Return the CBOR encoding of the attribute value item.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EXTENSION_REQUEST

      public static final int EXTENSION_REQUEST
      Extension Request (1.2.840.113549.1.9.14), RFC 2985.
      See Also:
    • CHALLENGE_PASSWORD

      public static final int CHALLENGE_PASSWORD
      Challenge Password (1.2.840.113549.1.9.7), RFC 2985.
      See Also:
    • PRIVATE_KEY_POSSESSION_STATEMENT

      public static final int PRIVATE_KEY_POSSESSION_STATEMENT
      Private Key Possession Statement (1.3.6.1.4.1.22112.2.1), RFC 9883.
      See Also:
  • Method Details

    • getRegistryValue

      public Integer getRegistryValue()
      Return the C509 CR Attributes Registry value when this attribute is carried in the int-coded form, or null when it uses the generic ~oid form.
    • getAttrType

      public org.bouncycastle.asn1.ASN1ObjectIdentifier getAttrType()
      Return the attribute's object identifier - resolved from the registry for the int-coded form.
    • getValueEncoding

      public byte[] getValueEncoding()
      Return the CBOR encoding of the attribute value item.