Class C509Extension
java.lang.Object
org.bouncycastle.cbor.c509.C509Extension
A single C509 extension (Section 3.1.10 of draft-ietf-cose-cbor-encoded-cert-20):
Extension = ( ( extensionID: int, extensionValue: Defined ) //
( extensionID: ~oid, extensionValue: bytes / [ bytes ] ) )
For the int-coded form the absolute value of the int is the C509 Extensions
Registry value, the sign carries criticality (negative for critical), and the value
is the specific CBOR encoding of Section 3.3. For the generic form the value is the
extnValue OCTET STRING value field, wrapped in a single element array when the
extension is critical.
Both forms materialize the DER encoding of the extension value at construction, so
an instance always answers getExtnId() and getExtnValue()
regardless of the wire form used.
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.ASN1ObjectIdentifierReturn the extension's object identifier - resolved from the registry for the int-coded form.byte[]Return the DER encoding of the extension value (the extnValue OCTET STRING value field).Return the C509 Extensions Registry value when this extension is carried in the int-coded form, or null when it uses the generic ~oid form.booleanReturn true if the extension is critical.
-
Method Details
-
getRegistryValue
Return the C509 Extensions Registry value when this extension is carried in the int-coded form, or null when it uses the generic ~oid form. -
isCritical
public boolean isCritical()Return true if the extension is critical. -
getExtnId
public org.bouncycastle.asn1.ASN1ObjectIdentifier getExtnId()Return the extension's object identifier - resolved from the registry for the int-coded form. -
getExtnValue
public byte[] getExtnValue()Return the DER encoding of the extension value (the extnValue OCTET STRING value field).
-