generate_psa_tests.py: adapt OpFail test generator for HKDF-Exract/Expand algs
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
6786a87ccd
commit
398c503f6f
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ def automatic_dependencies(*expressions: str) -> List[str]:
|
|||
"""
|
||||
used = set()
|
||||
for expr in expressions:
|
||||
# HKDF_EXTRACT and HKDF_EXPAND algs depend on HKDF
|
||||
if "HKDF_EXTRACT" in expr:
|
||||
expr = expr.replace("HKDF_EXTRACT", "HKDF")
|
||||
if "HKDF_EXPAND" in expr:
|
||||
expr = expr.replace("HKDF_EXPAND", "HKDF")
|
||||
used.update(re.findall(r'PSA_(?:ALG|ECC_FAMILY|KEY_TYPE)_\w+', expr))
|
||||
used.difference_update(SYMBOLS_WITHOUT_DEPENDENCY)
|
||||
return sorted(psa_want_symbol(name) for name in used)
|
||||
|
|
Loading…
Reference in a new issue