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>
diff --git a/scripts/mbedtls_framework/macro_collector.py b/scripts/mbedtls_framework/macro_collector.py index bc10418..5db80df 100644 --- a/scripts/mbedtls_framework/macro_collector.py +++ b/scripts/mbedtls_framework/macro_collector.py
@@ -281,7 +281,11 @@ # 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.