From 68e7544de8bebdf3b9408b319c156aaac66f941d Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Thu, 6 Jul 2023 11:21:39 +0200 Subject: [PATCH] parse_groups: curve -> group adaptations Signed-off-by: Przemek Stekiel --- programs/ssl/ssl_test_lib.c | 6 +++--- programs/ssl/ssl_test_lib.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/ssl/ssl_test_lib.c b/programs/ssl/ssl_test_lib.c index c03aff092..2ce4f1aa2 100644 --- a/programs/ssl/ssl_test_lib.c +++ b/programs/ssl/ssl_test_lib.c @@ -517,7 +517,7 @@ int parse_groups(const char *groups, uint16_t *group_list, size_t group_list_len if (strcmp(p, "none") == 0) { group_list[0] = 0; } else if (strcmp(p, "default") != 0) { - /* Leave room for a final NULL in curve list */ + /* Leave room for a final NULL in group list */ while (i < group_list_len - 1 && *p != '\0') { q = p; #if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED) && \ @@ -547,9 +547,9 @@ int parse_groups(const char *groups, uint16_t *group_list, size_t group_list_len } else #endif { - mbedtls_printf("unknown curve %s\n", q); + mbedtls_printf("unknown group %s\n", q); + mbedtls_printf("supported groups: "); #if defined(MBEDTLS_ECP_LIGHT) - mbedtls_printf("supported curves: "); for (curve_cur = mbedtls_ecp_curve_list(); curve_cur->grp_id != MBEDTLS_ECP_DP_NONE; curve_cur++) { diff --git a/programs/ssl/ssl_test_lib.h b/programs/ssl/ssl_test_lib.h index 0f6d6a26f..ef0dba718 100644 --- a/programs/ssl/ssl_test_lib.h +++ b/programs/ssl/ssl_test_lib.h @@ -312,7 +312,7 @@ void test_hooks_free(void); #endif /* !MBEDTLS_TEST_HOOKS */ /* Helper functions for FFDH groups. */ -int parse_groups(const char *curves, uint16_t *group_list, size_t group_list_len); +int parse_groups(const char *groups, uint16_t *group_list, size_t group_list_len); #endif /* MBEDTLS_SSL_TEST_IMPOSSIBLE conditions: else */ #endif /* MBEDTLS_PROGRAMS_SSL_SSL_TEST_LIB_H */