Fix exit status if the RNG seeding failed
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
53943ca434
commit
4a23c98506
2 changed files with 4 additions and 2 deletions
|
@ -1536,7 +1536,8 @@ int main( int argc, char *argv[] )
|
|||
mbedtls_printf( "\n . Seeding the random number generator..." );
|
||||
fflush( stdout );
|
||||
|
||||
if( rng_seed( &rng, opt.reproducible, pers ) != 0 )
|
||||
ret = rng_seed( &rng, opt.reproducible, pers );
|
||||
if( ret != 0 )
|
||||
goto exit;
|
||||
mbedtls_printf( " ok\n" );
|
||||
|
||||
|
|
|
@ -2295,7 +2295,8 @@ int main( int argc, char *argv[] )
|
|||
mbedtls_printf( "\n . Seeding the random number generator..." );
|
||||
fflush( stdout );
|
||||
|
||||
if( rng_seed( &rng, opt.reproducible, pers ) != 0 )
|
||||
ret = rng_seed( &rng, opt.reproducible, pers );
|
||||
if( ret != 0 )
|
||||
goto exit;
|
||||
mbedtls_printf( " ok\n" );
|
||||
|
||||
|
|
Loading…
Reference in a new issue