parse_groups: curve -> group adaptations
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
615cbcdbdf
commit
68e7544de8
2 changed files with 4 additions and 4 deletions
|
@ -517,7 +517,7 @@ int parse_groups(const char *groups, uint16_t *group_list, size_t group_list_len
|
||||||
if (strcmp(p, "none") == 0) {
|
if (strcmp(p, "none") == 0) {
|
||||||
group_list[0] = 0;
|
group_list[0] = 0;
|
||||||
} else if (strcmp(p, "default") != 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') {
|
while (i < group_list_len - 1 && *p != '\0') {
|
||||||
q = p;
|
q = p;
|
||||||
#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED) && \
|
#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
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
mbedtls_printf("unknown curve %s\n", q);
|
mbedtls_printf("unknown group %s\n", q);
|
||||||
|
mbedtls_printf("supported groups: ");
|
||||||
#if defined(MBEDTLS_ECP_LIGHT)
|
#if defined(MBEDTLS_ECP_LIGHT)
|
||||||
mbedtls_printf("supported curves: ");
|
|
||||||
for (curve_cur = mbedtls_ecp_curve_list();
|
for (curve_cur = mbedtls_ecp_curve_list();
|
||||||
curve_cur->grp_id != MBEDTLS_ECP_DP_NONE;
|
curve_cur->grp_id != MBEDTLS_ECP_DP_NONE;
|
||||||
curve_cur++) {
|
curve_cur++) {
|
||||||
|
|
|
@ -312,7 +312,7 @@ void test_hooks_free(void);
|
||||||
#endif /* !MBEDTLS_TEST_HOOKS */
|
#endif /* !MBEDTLS_TEST_HOOKS */
|
||||||
|
|
||||||
/* Helper functions for FFDH groups. */
|
/* 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_SSL_TEST_IMPOSSIBLE conditions: else */
|
||||||
#endif /* MBEDTLS_PROGRAMS_SSL_SSL_TEST_LIB_H */
|
#endif /* MBEDTLS_PROGRAMS_SSL_SSL_TEST_LIB_H */
|
||||||
|
|
Loading…
Reference in a new issue