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.

Change-Id: Ic27bf70894d73a1ec3e27dece50ae6e7a5f5a8f6
Signed-off-by: Amey Avinash Raghatate <AmeyAvinash.Raghatate@amd.com>
  • Loading branch information
amey-raghatate authored and Akshay-Belsare committed Nov 27, 2024
1 parent f75bb37 commit 51c7fa1
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 51c7fa1

Please sign in to comment.