mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #4859 from brett-warren-arm/supported_groups
Add mbedtls_ssl_conf_groups to API
This commit is contained in:
@ -678,7 +678,7 @@ int main( int argc, char *argv[] )
|
||||
#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 @@ int main( int argc, char *argv[] )
|
||||
|
||||
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 @@ int main( int argc, char *argv[] )
|
||||
|
||||
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 @@ int main( int argc, char *argv[] )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
curve_list[i] = MBEDTLS_ECP_DP_NONE;
|
||||
group_list[i] = 0;
|
||||
}
|
||||
}
|
||||
#endif /* MBEDTLS_ECP_C */
|
||||
@ -1889,7 +1889,7 @@ int main( int argc, char *argv[] )
|
||||
if( opt.curves != NULL &&
|
||||
strcmp( opt.curves, "default" ) != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_curves( &conf, curve_list );
|
||||
mbedtls_ssl_conf_groups( &conf, group_list );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user