1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

ECDSA: Add mbedtls_ecdsa_can_do

This commit is contained in:
Christoph M. Wintersteiger
2019-01-07 13:47:30 +00:00
committed by Janos Follath
parent 8a0f5bb3c1
commit 0082f9df6f
3 changed files with 32 additions and 5 deletions

View File

@ -835,6 +835,9 @@ int main( int argc, char *argv[] )
curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
curve_info++ )
{
if( mbedtls_ecdsa_can_do( curve_info->grp_id ) == 0 )
continue;
mbedtls_ecdsa_init( &ecdsa );
if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 )
@ -854,6 +857,9 @@ int main( int argc, char *argv[] )
curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
curve_info++ )
{
if( mbedtls_ecdsa_can_do( curve_info->grp_id ) == 0 )
continue;
mbedtls_ecdsa_init( &ecdsa );
if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 ||