1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

hack_dependencies_not_implemented: Also read inferred PSA_WANT symbols

To determine PSA mechanisms that are not implemented, also read PSA_WANT
symbols that cannot (or are not intended to) be configured independently,
and thus are not listed in psa/crypto_config.h. Find those symbols in
the config adjustment header mbedtls/config_psa.h.

No impact on generated files yet, because hack_dependencies_not_implemented
is currently only used on key types that have explicit dependencies. This
will allow using hack_dependencies_not_implemented in other places, for
example to handle algorithm variants like PSA_WANT_ALG_ECDSA_ANY which is
inferred from PSA_WANT_ALG_ECDSA.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2024-04-10 16:27:19 +02:00
parent c7b58d53fc
commit c113b42fc1

View File

@ -70,6 +70,8 @@ def hack_dependencies_not_implemented(dependencies: List[str]) -> None:
if _implemented_dependencies is None:
_implemented_dependencies = \
read_implemented_dependencies('include/psa/crypto_config.h')
_implemented_dependencies = _implemented_dependencies.union(
read_implemented_dependencies('include/mbedtls/config_psa.h'))
for dep in dependencies:
dep = dep.lstrip('!')
if dep.startswith('PSA_WANT') and dep not in _implemented_dependencies: