diff options
-rw-r--r-- | usr.bin/openssl/openssl.c | 7 | ||||
-rw-r--r-- | usr.bin/openssl/s_socket.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/usr.bin/openssl/openssl.c b/usr.bin/openssl/openssl.c index 76e1644f592..08e22ca829f 100644 --- a/usr.bin/openssl/openssl.c +++ b/usr.bin/openssl/openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openssl.c,v 1.2 2014/10/22 13:54:03 jsing Exp $ */ +/* $OpenBSD: openssl.c,v 1.3 2015/03/22 10:36:22 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -259,6 +259,11 @@ main(int argc, char **argv) exit(1); } + if (BIO_sock_init() != 1) { + BIO_printf(bio_err, "BIO_sock_init failed\n"); + exit(1); + } + CRYPTO_set_locking_callback(lock_dbg_cb); openssl_startup(); diff --git a/usr.bin/openssl/s_socket.c b/usr.bin/openssl/s_socket.c index 7c416d69bec..f54fb217ec3 100644 --- a/usr.bin/openssl/s_socket.c +++ b/usr.bin/openssl/s_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_socket.c,v 1.3 2014/12/03 22:16:02 bcook Exp $ */ +/* $OpenBSD: s_socket.c,v 1.4 2015/03/22 10:36:22 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,11 +85,6 @@ init_client(int *sock, char *host, char *port, int type, int af) struct addrinfo hints, *ai_top, *ai; int i, s; - if (BIO_sock_init() != 1) { - BIO_printf(bio_err, "BIO_sock_init failed\n"); - return (0); - } - memset(&hints, '\0', sizeof(hints)); hints.ai_family = af; hints.ai_socktype = type; @@ -181,11 +176,6 @@ init_server_long(int *sock, int port, char *ip, int type) struct sockaddr_in server; int s = -1; - if (BIO_sock_init() != 1) { - BIO_printf(bio_err, "BIO_sock_init failed\n"); - return (0); - } - memset((char *) &server, 0, sizeof(server)); server.sin_family = AF_INET; server.sin_port = htons((unsigned short) port); |