PR: 2061
authorDr. Stephen Henson <steve@openssl.org>
Thu, 1 Oct 2009 00:25:24 +0000 (00:25 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 1 Oct 2009 00:25:24 +0000 (00:25 +0000)
Submitted by: Julia Lawall <julia@diku.dk>
Approved by: steve@openssl.org

Correct i2b_PVK_bio error handling in rsa.c, dsa.c

apps/dsa.c
apps/rsa.c

index 9f38e2b77a3f9f1000ec385e8365c3bc90084534..1109346f78c7672e4d2ef54b68e35975f5975314 100644 (file)
@@ -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);
index 4a6206bb6663d23ebdb89932574e02e9d2c72671..b3c8aff7e33aca03252bbb93c9ef24bf305b2a5b 100644 (file)
@@ -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);