mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Merge pull request #4694 from gilles-peskine-arm/out_size-3.0
Add output size parameter to signature functions
This commit is contained in:
@@ -1084,7 +1084,7 @@ int main( int argc, char *argv[] )
|
||||
curve_info->name );
|
||||
TIME_PUBLIC( title, "sign",
|
||||
ret = mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size,
|
||||
tmp, &sig_len, myrand, NULL ) );
|
||||
tmp, sizeof( tmp ), &sig_len, myrand, NULL ) );
|
||||
|
||||
mbedtls_ecdsa_free( &ecdsa );
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 ||
|
||||
mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size,
|
||||
tmp, &sig_len, myrand, NULL ) != 0 )
|
||||
tmp, sizeof( tmp ), &sig_len, myrand, NULL ) != 0 )
|
||||
{
|
||||
mbedtls_exit( 1 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user