mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Add ecp_curve_list(), hide ecp_supported_curves
This commit is contained in:
parent
dace82f805
commit
da179e4870
5 changed files with 22 additions and 12 deletions
|
|
@ -94,6 +94,14 @@ const ecp_curve_info ecp_supported_curves[] =
|
|||
{ POLARSSL_ECP_DP_NONE, 0, 0, NULL },
|
||||
};
|
||||
|
||||
/*
|
||||
* List of supported curves and associated info
|
||||
*/
|
||||
const ecp_curve_info *ecp_curve_list( void )
|
||||
{
|
||||
return ecp_supported_curves;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize (the components of) a point
|
||||
*/
|
||||
|
|
@ -755,7 +763,7 @@ ecp_group_id ecp_grp_id_from_named_curve( uint16_t tls_id )
|
|||
{
|
||||
const ecp_curve_info *curve_info;
|
||||
|
||||
for( curve_info = ecp_supported_curves;
|
||||
for( curve_info = ecp_curve_list();
|
||||
curve_info->grp_id != POLARSSL_ECP_DP_NONE;
|
||||
curve_info++ )
|
||||
{
|
||||
|
|
@ -773,7 +781,7 @@ uint16_t ecp_named_curve_from_grp_id( ecp_group_id grp_id )
|
|||
{
|
||||
const ecp_curve_info *curve_info;
|
||||
|
||||
for( curve_info = ecp_supported_curves;
|
||||
for( curve_info = ecp_curve_list();
|
||||
curve_info->grp_id != POLARSSL_ECP_DP_NONE;
|
||||
curve_info++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue