Refactor ssl_{server2,client2} for NamedGroup IDs
Signed-off-by: Brett Warren <brett.warren@arm.com>
diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index a02d977..19e74be 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -678,7 +678,7 @@
#endif
#if defined(MBEDTLS_ECP_C)
- mbedtls_ecp_group_id curve_list[CURVE_LIST_SIZE];
+ uint16_t group_list[CURVE_LIST_SIZE];
const mbedtls_ecp_curve_info *curve_cur;
#endif
#if defined(MBEDTLS_SSL_DTLS_SRTP)
@@ -1452,7 +1452,7 @@
if( strcmp( p, "none" ) == 0 )
{
- curve_list[0] = MBEDTLS_ECP_DP_NONE;
+ group_list[0] = 0;
}
else if( strcmp( p, "default" ) != 0 )
{
@@ -1469,7 +1469,7 @@
if( ( curve_cur = mbedtls_ecp_curve_info_from_name( q ) ) != NULL )
{
- curve_list[i++] = curve_cur->grp_id;
+ group_list[i++] = curve_cur->tls_id;
}
else
{
@@ -1495,7 +1495,7 @@
goto exit;
}
- curve_list[i] = MBEDTLS_ECP_DP_NONE;
+ group_list[i] = 0;
}
}
#endif /* MBEDTLS_ECP_C */
@@ -1889,7 +1889,7 @@
if( opt.curves != NULL &&
strcmp( opt.curves, "default" ) != 0 )
{
- mbedtls_ssl_conf_curves( &conf, curve_list );
+ mbedtls_ssl_conf_groups( &conf, group_list );
}
#endif