diff options
author | jsing <> | 2014-05-18 11:36:24 +0000 |
---|---|---|
committer | jsing <> | 2014-05-18 11:36:24 +0000 |
commit | f1e8706ced8f59e8cca67cb75b29c503731e2555 (patch) | |
tree | 10eb763234a2d64874fa25d433f93e466943b13f /src/lib/libssl/src/apps/genrsa.c | |
parent | de4eef43c08fef5fd844116a63ef0e4e61d63f34 (diff) | |
download | openbsd-f1e8706ced8f59e8cca67cb75b29c503731e2555.tar.gz openbsd-f1e8706ced8f59e8cca67cb75b29c503731e2555.tar.bz2 openbsd-f1e8706ced8f59e8cca67cb75b29c503731e2555.zip |
bio_err is initialised in main, hence there is no need to initialise it
in each application (since there is no longer a non-monolithic mode).
In typical OpenSSL fashion, the code is inconsistent and there are multiple
ways that bio_err was initialised - none of them actually checked to see if
the initialisation actually succeeded. Additionally, it is worth noting
that in at least two cases bio_err was also being used before it would have
been initialised.
ok miod@
Diffstat (limited to 'src/lib/libssl/src/apps/genrsa.c')
-rw-r--r-- | src/lib/libssl/src/apps/genrsa.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 643e20da2f..7e5dd2b239 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
@@ -112,12 +112,9 @@ genrsa_main(int argc, char **argv) | |||
112 | signal(SIGPIPE, SIG_IGN); | 112 | signal(SIGPIPE, SIG_IGN); |
113 | BN_GENCB_set(&cb, genrsa_cb, bio_err); | 113 | BN_GENCB_set(&cb, genrsa_cb, bio_err); |
114 | 114 | ||
115 | if (bio_err == NULL) | ||
116 | if ((bio_err = BIO_new(BIO_s_file())) != NULL) | ||
117 | BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT); | ||
118 | |||
119 | if (!load_config(bio_err, NULL)) | 115 | if (!load_config(bio_err, NULL)) |
120 | goto err; | 116 | goto err; |
117 | |||
121 | if ((out = BIO_new(BIO_s_file())) == NULL) { | 118 | if ((out = BIO_new(BIO_s_file())) == NULL) { |
122 | BIO_printf(bio_err, "unable to create BIO for output\n"); | 119 | BIO_printf(bio_err, "unable to create BIO for output\n"); |
123 | goto err; | 120 | goto err; |