diff --git a/apps/dsa.c b/apps/dsa.c index 9f38e2b77..1109346f7 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -351,7 +351,7 @@ bad: BIO_printf(bio_err,"bad output format specified for outfile\n"); goto end; } - if (!i) + if (i <= 0) { BIO_printf(bio_err,"unable to write private key\n"); ERR_print_errors(bio_err); diff --git a/apps/rsa.c b/apps/rsa.c index 4a6206bb6..b3c8aff7e 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -426,7 +426,7 @@ bad: BIO_printf(bio_err,"bad output format specified for outfile\n"); goto end; } - if (!i) + if (i <= 0) { BIO_printf(bio_err,"unable to write key\n"); ERR_print_errors(bio_err);