From ba6f9a62d7042303741014208e348296e7d26a60 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Tue, 8 Sep 2026 12:22:45 +0200 Subject: [PATCH] crypto_data_tests: add entry for SM3 Currently the lambda function is set to None meaning that no test data will be automatically generated. This is an hashlib Python library limitation though and it can be addressed in the future whenever the Python library is upgraded or a different solution is found to compute hashes. Signed-off-by: Valerio Setti --- scripts/mbedtls_framework/crypto_data_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/mbedtls_framework/crypto_data_tests.py b/scripts/mbedtls_framework/crypto_data_tests.py index 81972d06e..c84e7292a 100644 --- a/scripts/mbedtls_framework/crypto_data_tests.py +++ b/scripts/mbedtls_framework/crypto_data_tests.py @@ -59,6 +59,7 @@ class HashPSALowLevel: 'PSA_ALG_ASCON_HASH256': None, #lambda data: ascon.ascon_hash(data), 'PSA_ALG_BLAKE2S_HASH256': lambda data: hashlib.blake2s(data).hexdigest(), 'PSA_ALG_BLAKE2B_HASH512': lambda data: hashlib.blake2b(data).hexdigest(), + 'PSA_ALG_SM3': None, #lambda data: hashlib.new('sm3').hexdigest(), } #type: Dict[str, Optional[Callable[[bytes], str]]] @staticmethod