Skip to content

Commit

Permalink
xtest: regression 4002: add conditional statement to check for SM3 al…
Browse files Browse the repository at this point in the history
…gorithm

Add a conditional statement to check for the SM3 algorithm test case. Test
cases related to the SM3 algorithm should not execute, as the SM3 algorithm
is disabled on the platform side.

Signed-off-by: Amey Avinash Raghatate <[email protected]>
Signed-off-by: Akshay Belsare <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
  • Loading branch information
amey-raghatate authored and jforissier committed Nov 28, 2024
1 parent f75bb37 commit c813a50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions host/xtest/regression_4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,14 @@ static void xtest_tee_test_4002(ADBG_Case_t *c)
size_t key_size = 0;
size_t offs = 0;

if (mac_cases[n].algo == TEE_ALG_HMAC_SM3 &&
!ta_crypt_cmd_is_algo_supported(c, &session,
TEE_ALG_HMAC_SM3,
TEE_CRYPTO_ELEMENT_NONE)) {
Do_ADBG_Log("SM3 not supported: skip subcase");
continue;
}

Do_ADBG_BeginSubCase(c, "MAC case %d algo 0x%x",
(int)n, (unsigned int)mac_cases[n].algo);

Expand Down

0 comments on commit c813a50

Please sign in to comment.