generate_psa_tests: fix automatically generated tests for RSA
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
acab57b6b4
commit
42796e25cf
1 changed files with 5 additions and 9 deletions
|
@ -121,19 +121,15 @@ def tweak_key_pair_dependency(dep: str, usage: str):
|
||||||
symbols according to the required usage.
|
symbols according to the required usage.
|
||||||
"""
|
"""
|
||||||
ret_list = list()
|
ret_list = list()
|
||||||
# Note: this LEGACY replacement for RSA is temporary and it's going to be
|
if dep.endswith('KEY_PAIR'):
|
||||||
# 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 usage == "BASIC":
|
if usage == "BASIC":
|
||||||
# BASIC automatically includes IMPORT and EXPORT for test purposes (see
|
# BASIC automatically includes IMPORT and EXPORT for test purposes (see
|
||||||
# config_psa.h).
|
# config_psa.h).
|
||||||
ret_list.append(re.sub(r'ECC_KEY_PAIR', r'ECC_KEY_PAIR_BASIC', dep))
|
ret_list.append(re.sub(r'KEY_PAIR', r'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'KEY_PAIR', r'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_EXPORT', dep))
|
||||||
elif usage == "GENERATE":
|
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:
|
else:
|
||||||
# No replacement to do in this case
|
# No replacement to do in this case
|
||||||
ret_list.append(dep)
|
ret_list.append(dep)
|
||||||
|
|
Loading…
Reference in a new issue