mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
test: fix python script for PSA test generation
This is a temporary fix for replacing PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR with the temporary symbols MBEDTLS_PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_LEGACY. Once new PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_yyy will be used both in library's code and tests, then this fix will be removed. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
@ -35,6 +35,14 @@ from mbedtls_dev import test_data_generation
|
|||||||
|
|
||||||
def psa_want_symbol(name: str) -> str:
|
def psa_want_symbol(name: str) -> str:
|
||||||
"""Return the PSA_WANT_xxx symbol associated with a PSA crypto feature."""
|
"""Return the PSA_WANT_xxx symbol associated with a PSA crypto feature."""
|
||||||
|
# PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR symbols are deprecated and they should
|
||||||
|
# be replaced soon with newer PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_yyy in
|
||||||
|
# library's code and tests. Until this happen though, they have been
|
||||||
|
# renamed to temporary internal symbols
|
||||||
|
# MBEDTLS_PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_LEGACY so this is what must
|
||||||
|
# be used in tests' dependencies.
|
||||||
|
if name.endswith('RSA_KEY_PAIR') or name.endswith('ECC_KEY_PAIR'):
|
||||||
|
return 'MBEDTLS_' + name[:4] + 'WANT_' + name[4:] + '_LEGACY'
|
||||||
if name.startswith('PSA_'):
|
if name.startswith('PSA_'):
|
||||||
return name[:4] + 'WANT_' + name[4:]
|
return name[:4] + 'WANT_' + name[4:]
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user