mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-27 01:36:59 +01:00
Merge remote-tracking branch 'upstream-public/pr/2175' into development
This commit is contained in:
commit
9055a7d855
2 changed files with 7 additions and 2 deletions
|
|
@ -322,7 +322,8 @@ int main( int argc, char *argv[] )
|
|||
mbedtls_printf( "\n . Generating the private key ..." );
|
||||
fflush( stdout );
|
||||
|
||||
if( ( ret = mbedtls_pk_setup( &key, mbedtls_pk_info_from_type( opt.type ) ) ) != 0 )
|
||||
if( ( ret = mbedtls_pk_setup( &key,
|
||||
mbedtls_pk_info_from_type( (mbedtls_pk_type_t) opt.type ) ) ) != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! mbedtls_pk_setup returned -0x%04x", -ret );
|
||||
goto exit;
|
||||
|
|
@ -344,7 +345,8 @@ int main( int argc, char *argv[] )
|
|||
#if defined(MBEDTLS_ECP_C)
|
||||
if( opt.type == MBEDTLS_PK_ECKEY )
|
||||
{
|
||||
ret = mbedtls_ecp_gen_key( opt.ec_curve, mbedtls_pk_ec( key ),
|
||||
ret = mbedtls_ecp_gen_key( (mbedtls_ecp_group_id) opt.ec_curve,
|
||||
mbedtls_pk_ec( key ),
|
||||
mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||
if( ret != 0 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue