Fix exit status if the RNG seeding failed

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-02-03 13:54:41 +01:00
parent 53943ca434
commit 4a23c98506
2 changed files with 4 additions and 2 deletions

View file

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

View file

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