parse_groups: curve -> group adaptations

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-07-06 11:21:39 +02:00
parent 615cbcdbdf
commit 68e7544de8
2 changed files with 4 additions and 4 deletions

View file

@ -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++) {

View file

@ -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 */