Skip to content

Commit

Permalink
update: skip decrypt_known_good_aeskw_non_aead_test() with MbedTLS 2.28
Browse files Browse the repository at this point in the history
  • Loading branch information
kentakayama committed Oct 23, 2023
1 parent 54a2bfc commit 31918c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/t_cose_encrypt_decrypt_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,16 @@ int32_t decrypt_key_wrap(struct q_useful_buf_c cose_encrypt_buffer)
int32_t decrypt_known_good_aeskw_non_aead_test(void)
{
int32_t return_value;

if(!t_cose_is_algorithm_supported(T_COSE_ALGORITHM_A128KW)) {
/* This is necessary because MbedTLS 2.28 doesn't have
* nist KW enabled by default. The PSA crypto layer deals with
* this dynamically. The below tests will correctly link
* on 2.28, but will fail to run so this exception is needed.
*/
return INT32_MIN; /* Means no testing was actually done */
}

return_value = decrypt_key_wrap(UsefulBuf_FROM_BYTE_ARRAY_LITERAL(cose_encrypt_aes_kw_aes_ctr));
if(return_value != 0) {
return return_value + 10000;
Expand Down

0 comments on commit 31918c6

Please sign in to comment.