Skip to content

Commit d58e3a5

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 9df607d commit d58e3a5

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
@@ -88,8 +88,8 @@ def __init__(self):
8888
self.table_by_prefix = {
8989
'ERROR': self.statuses,
9090
'ALG': self.algorithms,
91-
'CURVE': self.ecc_curves,
92-
'GROUP': self.dh_groups,
91+
'ECC_CURVE': self.ecc_curves,
92+
'DH_GROUP': self.dh_groups,
9393
'KEY_TYPE': self.key_types,
9494
'KEY_USAGE': self.key_usage_flags,
9595
}
@@ -172,7 +172,7 @@ def _argument_split(cls, arguments):
172172
# Groups: 1=macro name, 2=type, 3=argument list (optional).
173173
_header_line_re = \
174174
re.compile(r'#define +' +
175-
r'(PSA_((?:KEY_)?[A-Z]+)_\w+)' +
175+
r'(PSA_((?:(?:DH|ECC|KEY)_)?[A-Z]+)_\w+)' +
176176
r'(?:\(([^\n()]*)\))?')
177177
# Regex of macro names to exclude.
178178
_excluded_name_re = re.compile(r'_(?:GET|IS|OF)_|_(?:BASE|FLAG|MASK)\Z')

0 commit comments

Comments
 (0)