From 1b06d09fc62453a9de67655e14c8f272b86bad51 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 22 Sep 2021 14:47:26 +0200 Subject: [PATCH] Test PSA_HASH_BLOCK_LENGTH Only tested for algorithms for which we support HMAC, since that's all we use PSA_HASH_BLOCK_LENGTH for at the moment. Signed-off-by: Gilles Peskine --- tests/suites/test_suite_psa_crypto_metadata.function | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/suites/test_suite_psa_crypto_metadata.function b/tests/suites/test_suite_psa_crypto_metadata.function index 7002034ab..827ad1b36 100644 --- a/tests/suites/test_suite_psa_crypto_metadata.function +++ b/tests/suites/test_suite_psa_crypto_metadata.function @@ -350,6 +350,7 @@ void hmac_algorithm( int alg_arg, TEST_ASSERT( PSA_ALG_IS_HASH( hash_alg ) ); TEST_EQUAL( PSA_ALG_HMAC( hash_alg ), alg ); + TEST_ASSERT( block_size == PSA_HASH_BLOCK_LENGTH( alg ) ); TEST_ASSERT( block_size <= PSA_HMAC_MAX_HASH_BLOCK_SIZE ); test_mac_algorithm( alg_arg, ALG_IS_HMAC, length,