mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-10 22:05:37 +00:00
- Added appropriate error handling to ctr_drbg_init()
This commit is contained in:
parent
3f9b650b4b
commit
fb3a83f9e3
|
@ -61,7 +61,12 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
|
||||
entropy_init( &entropy );
|
||||
ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (unsigned char *) "RANDOM_GEN", 10 );
|
||||
ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (unsigned char *) "RANDOM_GEN", 10 );
|
||||
if( ret != 0 )
|
||||
{
|
||||
printf( "failed in ctr_drbg_init: %d\n", ret );
|
||||
goto cleanup;
|
||||
}
|
||||
ctr_drbg_set_prediction_resistance( &ctr_drbg, CTR_DRBG_PR_OFF );
|
||||
|
||||
#if defined(POLARSSL_FS_IO)
|
||||
|
|
Loading…
Reference in a new issue