From 402381d2a600ecf09a71b986f9964add3b70f59d Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Tue, 24 Sep 2024 19:46:54 +0200 Subject: [PATCH] Collect the algorithms Use Algorithm from crypto_knowledge to use its functionality. Signed-off-by: Gabor Mezei --- tests/scripts/depends.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py index 2ad01ad193..1ff6a02d9e 100755 --- a/tests/scripts/depends.py +++ b/tests/scripts/depends.py @@ -56,6 +56,8 @@ from typing import Union import scripts_path # pylint: disable=unused-import import config from mbedtls_framework import c_build_helper +from mbedtls_framework import crypto_knowledge +from mbedtls_framework import psa_information class Colors: # pylint: disable=too-few-public-methods """Minimalistic support for colored output. @@ -481,6 +483,12 @@ class DomainData: build_command = [options.make_command, 'CFLAGS=-Werror -O2'] build_and_test = [build_command, [options.make_command, 'test']] self.all_config_symbols = set(conf.settings.keys()) + psa_info = psa_information.Information().constructors + algs = {crypto_knowledge.Algorithm(alg): symbol + for alg, symbol in ((alg, psa_information.psa_want_symbol(alg)) + for alg in psa_info.algorithms) + if symbol in self.all_config_symbols} + # Find hash modules by name. hash_symbols = self.config_symbols_matching(r'MBEDTLS_(MD|RIPEMD|SHA)[0-9]+_C\Z') # Find elliptic curve enabling macros by name.