Skip to content

Commit 239c0d8

Browse files
PSA_WANT_xxx is only meaningful when PSA crypto is enabled
Signed-off-by: Gilles Peskine <[email protected]>
1 parent 1de0641 commit 239c0d8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/generate_config_tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def dependencies_of_setting(cfg: config_common.Config,
8080
be negated by prefixing them with '!'. This is the same syntax as a
8181
depends_on directive in test data.
8282
"""
83-
#pylint: disable=too-many-return-statements
83+
#pylint: disable=too-many-branches,too-many-return-statements
8484
name = setting.name
8585
if name in SIMPLE_DEPENDENCIES:
8686
return SIMPLE_DEPENDENCIES[name]
@@ -114,9 +114,12 @@ def dependencies_of_setting(cfg: config_common.Config,
114114
super_name = name[:pos.start()] + '_C'
115115
if cfg.known(super_name):
116116
return super_name
117-
m = PSA_WANT_KEY_TYPE_KEY_PAIR_RE.match(name)
118-
if m and m.group('operation') != 'BASIC':
119-
return m.group('prefix') + 'BASIC'
117+
if name.startswith('PSA_WANT_'):
118+
deps = 'MBEDTLS_PSA_CRYPTO_CLIENT'
119+
m = PSA_WANT_KEY_TYPE_KEY_PAIR_RE.match(name)
120+
if m and m.group('operation') != 'BASIC':
121+
deps += ':' + m.group('prefix') + 'BASIC'
122+
return deps
120123
return None
121124

122125
def conditions_for_setting(cfg: config_common.Config,

0 commit comments

Comments
 (0)