mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 14:08:39 +00:00
Merge pull request #4859 from brett-warren-arm/supported_groups
Add mbedtls_ssl_conf_groups to API
This commit is contained in:
commit
0dbe1dfa1c
12 changed files with 327 additions and 106 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1340,7 +1340,7 @@ int main( int argc, char *argv[] )
|
|||
sni_entry *sni_info = NULL;
|
||||
#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_ALPN)
|
||||
|
|
@ -2196,7 +2196,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 )
|
||||
{
|
||||
|
|
@ -2213,7 +2213,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
|
||||
{
|
||||
|
|
@ -2239,7 +2239,7 @@ int main( int argc, char *argv[] )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
curve_list[i] = MBEDTLS_ECP_DP_NONE;
|
||||
group_list[i] = 0;
|
||||
}
|
||||
}
|
||||
#endif /* MBEDTLS_ECP_C */
|
||||
|
|
@ -2903,7 +2903,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue