Support new destructor in PSA Crypto API 1.4

Recognize `PSA_ALG_SIGN_SUPPORTS_CONTEXT` as a destructor.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-01-07 16:06:45 +01:00
parent 1ef0e676bf
commit 29697c90ff
+5 -1
View File
@@ -281,7 +281,11 @@ class PSAMacroCollector(PSAMacroEnumerator):
# Macro that is a destructor, not a constructor (i.e. takes a thing as
# an argument and analyzes it, rather than constructing a thing).
_destructor_name_re = re.compile(r'.*(_GET_|_HAS_|_IS_)|.*_LENGTH\Z')
_destructor_name_re = re.compile('|'.join([
r'.*(?:_GET_|_HAS_|_IS_)',
r'.*_LENGTH\Z',
r'PSA_ALG_SIGN_SUPPORTS_CONTEXT\Z',
]))
# Macro that converts between things, rather than building a thing from
# scratch.