Skip to content

Commit

Permalink
PSA_WANT_xxx is only meaningful when PSA crypto is enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Oct 10, 2024
1 parent 1de0641 commit 239c0d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/generate_config_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def dependencies_of_setting(cfg: config_common.Config,
be negated by prefixing them with '!'. This is the same syntax as a
depends_on directive in test data.
"""
#pylint: disable=too-many-return-statements
#pylint: disable=too-many-branches,too-many-return-statements
name = setting.name
if name in SIMPLE_DEPENDENCIES:
return SIMPLE_DEPENDENCIES[name]
Expand Down Expand Up @@ -114,9 +114,12 @@ def dependencies_of_setting(cfg: config_common.Config,
super_name = name[:pos.start()] + '_C'
if cfg.known(super_name):
return super_name
m = PSA_WANT_KEY_TYPE_KEY_PAIR_RE.match(name)
if m and m.group('operation') != 'BASIC':
return m.group('prefix') + 'BASIC'
if name.startswith('PSA_WANT_'):
deps = 'MBEDTLS_PSA_CRYPTO_CLIENT'
m = PSA_WANT_KEY_TYPE_KEY_PAIR_RE.match(name)
if m and m.group('operation') != 'BASIC':
deps += ':' + m.group('prefix') + 'BASIC'
return deps
return None

def conditions_for_setting(cfg: config_common.Config,
Expand Down

0 comments on commit 239c0d8

Please sign in to comment.