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 9f38e2b..1109346 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 4a6206b..b3c8aff 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);