Class C509Extensions
java.lang.Object
org.bouncycastle.cbor.c509.C509Extensions
The C509 extensions field (Section 3.1.10 of draft-ietf-cose-cbor-encoded-cert-20):
Extensions = [ * Extension ] / intAn omitted X.509 extensions field is an empty CBOR array. When the only extension present is an int-coded keyUsage, the array is elided and the field is a single CBOR int whose absolute value is the keyUsage value and whose sign is the criticality.
-
Method Summary
Modifier and TypeMethodDescriptionstatic C509ExtensionsfromX509Extensions(org.bouncycastle.asn1.x509.Extensions x509Extensions) Build the C509 form of a set of X.509 extensions.getExtension(int index) Return the extension at the given index, in certificate order.intsize()Return the number of extensions.org.bouncycastle.asn1.x509.ExtensionsReturn the X.509 view of the extensions, or null when there are none (an omitted X.509 extensions field).
-
Method Details
-
fromX509Extensions
public static C509Extensions fromX509Extensions(org.bouncycastle.asn1.x509.Extensions x509Extensions) Build the C509 form of a set of X.509 extensions. Extensions in the C509 Extensions Registry whose values the specific CBOR encodings of Section 3.3 can faithfully represent use the int-coded form; everything else is carried in the generic ~oid form. Passing null (an absent X.509 extensions field) yields an empty extension list. -
size
public int size()Return the number of extensions. -
getExtension
Return the extension at the given index, in certificate order. -
toX509Extensions
public org.bouncycastle.asn1.x509.Extensions toX509Extensions()Return the X.509 view of the extensions, or null when there are none (an omitted X.509 extensions field).
-