parse

fun parse(encodedSignedVical: ByteArray, disableSignatureVerification: Boolean = false): SignedVical

Parses a signed VAL.

This takes a COSE_Sign1 according to ISO/IEC 18013-5:2021 section C.1.7.1 VICAL CDDL profile.

This includes checking that the VICAL is signed by the key in the leaf certificate of the X.509 certificate chain. It is not checked that the certificate chain is well-formed.

Return

a SignedVical instance.

Parameters

encodedSignedVical

the encoded CBOR with the COSE_Sign1 described above.

disableSignatureVerification

set to true to disable signature verification.

Throws

if the passed in signed VICAL is malformed

if signature verification failed.