From ab8bea23e6a5628e288553d073ce377428f23b2e Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 5 May 2022 11:19:38 +0800 Subject: [PATCH] fix comment and name issues in debug helper Signed-off-by: Jerry Yu --- scripts/generate_ssl_debug_helpers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/generate_ssl_debug_helpers.py b/scripts/generate_ssl_debug_helpers.py index 86a54ea8a..4be6fd6c0 100755 --- a/scripts/generate_ssl_debug_helpers.py +++ b/scripts/generate_ssl_debug_helpers.py @@ -300,19 +300,19 @@ class NamedGroupDefinition: Generate helper functions for named group It generates translation function from named group define to string. - Signature algorithm definition looks like: + Named group definition looks like: #define MBEDTLS_SSL_IANA_TLS_GROUP_[ upper case named group ] [ value(hex) ] Known limitation: - - the definitions SHOULD exist in same macro blocks. + - the definitions SHOULD exist in same macro blocks. """ @classmethod def extract(cls, source_code, start=0, end=-1): - sig_alg_pattern = re.compile(r'#define\s+(?PMBEDTLS_SSL_IANA_TLS_GROUP_\w+)\s+' + - r'(?P0[xX][0-9a-fA-F]+)$', - re.MULTILINE | re.DOTALL) - matches = list(sig_alg_pattern.finditer(source_code, start, end)) + named_group_pattern = re.compile(r'#define\s+(?PMBEDTLS_SSL_IANA_TLS_GROUP_\w+)\s+' + + r'(?P0[xX][0-9a-fA-F]+)$', + re.MULTILINE | re.DOTALL) + matches = list(named_group_pattern.finditer(source_code, start, end)) if matches: yield NamedGroupDefinition(source_code, definitions=matches)