riot_sys

Function cose_sign_verify

Source
pub unsafe extern "C" fn cose_sign_verify(
    sign: *const cose_sign_dec_t,
    signature: *mut cose_signature_dec_t,
    key: *mut cose_key_t,
    buf: *mut u8,
    len: size_t,
) -> c_int
Expand description

Verify the signature of the signed data with the supplied signature object

The buffer is required as scratch space to build the signature structs in. The buffer must be large enough to contain the headers, payload and the additional authenticated data.

See @ref cose_sign_verify_buffer_required to get the buffer size required to verify the signature

@param sign The sign object to verify @param signature A signature object belonging to the sign object @param key The key to verify with @param buf Buffer to write in @param len Size of the buffer to write in

@return 0 on verification success @return Negative on error