Package org.webpki.cbor
Class CBORCryptoUtils
java.lang.Object
org.webpki.cbor.CBORCryptoUtils
Class holding CBOR crypto support.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for collecting tagged or custom data.static interface
Interface for customizing map objects.static enum
Policy regarding additional CSF and CEF features. -
Method Summary
Modifier and TypeMethodDescriptionstatic X509Certificate[]
decodeCertificateArray
(CBORArray array) Decode a certificate path from a CBOR array.static CBORArray
encodeCertificateArray
(X509Certificate[] certificatePath) Encode certificate path into a CBOR array.
-
Method Details
-
decodeCertificateArray
Decode a certificate path from a CBOR array.The CBOR array is assumed to hold one or more X.509 certificates in DER format, each encoded as a CBOR
byte string
. Note that the certificates must be featured in ascending order with respect to parenthood. That is, the certificate at index0
would normally be an end-entity certificate.- Parameters:
array
- CBOR array with X.509 certificates- Returns:
- Decoded X.509 certificate path
-
encodeCertificateArray
Encode certificate path into a CBOR array.Note that the certificates must be featured in ascending order with respect to parenthood. That is, the certificate at index
0
would normally be an end-entity certificate. The CBOR array will after processing hold a list of DER-encoded certificates, each represented by a CBORbyte string
.See also
decodeCertificateArray(CBORArray)
.- Parameters:
certificatePath
- X.509 certificate path to be encoded- Returns:
- CBOR array with X.509 certificates
-