Skip to content

Commit 98a710c

Browse files
Fix the collection of ECC curves and DH groups
PSA_ECC_CURVE_xxx and PSA_DH_GROUP_xxx were not collected from headers, only from test suites.
1 parent 8c8694c commit 98a710c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/scripts/test_psa_constant_names.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def __init__(self):
8989
self.table_by_prefix = {
9090
'ERROR': self.statuses,
9191
'ALG': self.algorithms,
92-
'CURVE': self.ecc_curves,
93-
'GROUP': self.dh_groups,
92+
'ECC_CURVE': self.ecc_curves,
93+
'DH_GROUP': self.dh_groups,
9494
'KEY_TYPE': self.key_types,
9595
'KEY_USAGE': self.key_usage_flags,
9696
}
@@ -183,7 +183,7 @@ def _argument_split(cls, arguments):
183183
# Groups: 1=macro name, 2=type, 3=argument list (optional).
184184
_header_line_re = \
185185
re.compile(r'#define +' +
186-
r'(PSA_((?:KEY_)?[A-Z]+)_\w+)' +
186+
r'(PSA_((?:(?:DH|ECC|KEY)_)?[A-Z]+)_\w+)' +
187187
r'(?:\(([^\n()]*)\))?')
188188
# Regex of macro names to exclude.
189189
_excluded_name_re = re.compile(r'_(?:GET|IS|OF)_|_(?:BASE|FLAG|MASK)\Z')

0 commit comments

Comments
 (0)