13 #include "t_cose_sign1_verify.h"
14 #include "q_useful_buf.h"
15 #include "qcbor_util.h"
31 struct q_useful_buf_c token)
33 enum t_cose_err_t t_cose_error;
36 int32_t t_cose_options = 0;
37 struct t_cose_sign1_verify_ctx verify_ctx;
38 struct t_cose_key attest_key;
43 t_cose_options |= T_COSE_OPT_ALLOW_SHORT_CIRCUIT;
45 t_cose_sign1_verify_init(&verify_ctx, t_cose_options);
52 attest_key.crypto_lib = T_COSE_CRYPTO_LIB_PSA;
53 attest_key.k.key_handle = public_key;
55 t_cose_sign1_set_verification_key(&verify_ctx, attest_key);
57 t_cose_error = t_cose_sign1_verify(&verify_ctx,
62 return_value = map_t_cose_errors(t_cose_error);
enum attest_token_err_t last_error
Attestation Token Decoding Interface.
Platform Security Architecture cryptography module.
psa_attest_err_t
Initial attestation service error types.
#define TOKEN_OPT_SHORT_CIRCUIT_SIGN
enum attest_token_err_t attest_token_decode_validate_token(struct attest_token_decode_context *me, struct q_useful_buf_c token)
Set the token to work on and validate its signature.
enum psa_attest_err_t attest_register_initial_attestation_public_key(psa_key_handle_t *public_key)
Register the initial attestation public key to Crypto service to verify the signature of the token...
struct q_useful_buf_c payload
enum psa_attest_err_t attest_unregister_initial_attestation_public_key(psa_key_handle_t public_key)
Unregister the initial attestation public key from Crypto service to do not occupy key slot...