- Added appropriate error handling to ctr_drbg_init()

This commit is contained in:
Paul Bakker 2011-12-15 20:05:53 +00:00
parent 3f9b650b4b
commit fb3a83f9e3

View file

@ -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)