diff options
author | bcook <> | 2015-03-22 10:36:22 +0000 |
---|---|---|
committer | bcook <> | 2015-03-22 10:36:22 +0000 |
commit | a3234082ca1ac57c73464f00b84478c76802777c (patch) | |
tree | 891d4e431f3afa10dee3ed12733e6d7726ac425f /src/usr.bin/openssl/openssl.c | |
parent | 3569ef02e7db1fd98383bdf5283da4fd5d52bf21 (diff) | |
download | openbsd-a3234082ca1ac57c73464f00b84478c76802777c.tar.gz openbsd-a3234082ca1ac57c73464f00b84478c76802777c.tar.bz2 openbsd-a3234082ca1ac57c73464f00b84478c76802777c.zip |
Since Windows needs BIO_sock_init() before you can call any networking
functions, and ocsp and s_time need networking enabled too, this just moves
BIO_sock_init() up into main() as a catch-all for all of the commands.
Of course, it is a no-op on any other platform.
ok @guenther
Diffstat (limited to 'src/usr.bin/openssl/openssl.c')
-rw-r--r-- | src/usr.bin/openssl/openssl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c index 76e1644f59..08e22ca829 100644 --- a/src/usr.bin/openssl/openssl.c +++ b/src/usr.bin/openssl/openssl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: openssl.c,v 1.2 2014/10/22 13:54:03 jsing Exp $ */ | 1 | /* $OpenBSD: openssl.c,v 1.3 2015/03/22 10:36:22 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -259,6 +259,11 @@ main(int argc, char **argv) | |||
259 | exit(1); | 259 | exit(1); |
260 | } | 260 | } |
261 | 261 | ||
262 | if (BIO_sock_init() != 1) { | ||
263 | BIO_printf(bio_err, "BIO_sock_init failed\n"); | ||
264 | exit(1); | ||
265 | } | ||
266 | |||
262 | CRYPTO_set_locking_callback(lock_dbg_cb); | 267 | CRYPTO_set_locking_callback(lock_dbg_cb); |
263 | 268 | ||
264 | openssl_startup(); | 269 | openssl_startup(); |