From 42796e25cf249e1ebf6f3c6635b0b5f3e6d9d739 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Mon, 10 Jul 2023 12:24:34 +0200 Subject: [PATCH] generate_psa_tests: fix automatically generated tests for RSA Signed-off-by: Valerio Setti --- tests/scripts/generate_psa_tests.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index a77ece691..f5d83c6fb 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -121,19 +121,15 @@ def tweak_key_pair_dependency(dep: str, usage: str): symbols according to the required usage. """ ret_list = list() - # Note: this LEGACY replacement for RSA is temporary and it's going to be - # aligned with ECC one in #7772. - if dep.endswith('RSA_KEY_PAIR'): - ret_list.append(re.sub(r'RSA_KEY_PAIR\Z', r'RSA_KEY_PAIR_LEGACY', dep)) - elif dep.endswith('ECC_KEY_PAIR'): + if dep.endswith('KEY_PAIR'): if usage == "BASIC": # BASIC automatically includes IMPORT and EXPORT for test purposes (see # config_psa.h). - ret_list.append(re.sub(r'ECC_KEY_PAIR', r'ECC_KEY_PAIR_BASIC', dep)) - ret_list.append(re.sub(r'ECC_KEY_PAIR', r'ECC_KEY_PAIR_IMPORT', dep)) - ret_list.append(re.sub(r'ECC_KEY_PAIR', r'ECC_KEY_PAIR_EXPORT', dep)) + ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_BASIC', dep)) + ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_IMPORT', dep)) + ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_EXPORT', dep)) elif usage == "GENERATE": - ret_list.append(re.sub(r'ECC_KEY_PAIR', r'ECC_KEY_PAIR_GENERATE', dep)) + ret_list.append(re.sub(r'KEY_PAIR', r'KEY_PAIR_GENERATE', dep)) else: # No replacement to do in this case ret_list.append(dep)