diff options
-rw-r--r-- | src/usr.bin/openssl/openssl.c | 7 | ||||
-rw-r--r-- | src/usr.bin/openssl/s_socket.c | 12 |
2 files changed, 7 insertions, 12 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(); |
diff --git a/src/usr.bin/openssl/s_socket.c b/src/usr.bin/openssl/s_socket.c index 7c416d69be..f54fb217ec 100644 --- a/src/usr.bin/openssl/s_socket.c +++ b/src/usr.bin/openssl/s_socket.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_socket.c,v 1.3 2014/12/03 22:16:02 bcook Exp $ */ | 1 | /* $OpenBSD: s_socket.c,v 1.4 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 | * |
@@ -85,11 +85,6 @@ init_client(int *sock, char *host, char *port, int type, int af) | |||
85 | struct addrinfo hints, *ai_top, *ai; | 85 | struct addrinfo hints, *ai_top, *ai; |
86 | int i, s; | 86 | int i, s; |
87 | 87 | ||
88 | if (BIO_sock_init() != 1) { | ||
89 | BIO_printf(bio_err, "BIO_sock_init failed\n"); | ||
90 | return (0); | ||
91 | } | ||
92 | |||
93 | memset(&hints, '\0', sizeof(hints)); | 88 | memset(&hints, '\0', sizeof(hints)); |
94 | hints.ai_family = af; | 89 | hints.ai_family = af; |
95 | hints.ai_socktype = type; | 90 | hints.ai_socktype = type; |
@@ -181,11 +176,6 @@ init_server_long(int *sock, int port, char *ip, int type) | |||
181 | struct sockaddr_in server; | 176 | struct sockaddr_in server; |
182 | int s = -1; | 177 | int s = -1; |
183 | 178 | ||
184 | if (BIO_sock_init() != 1) { | ||
185 | BIO_printf(bio_err, "BIO_sock_init failed\n"); | ||
186 | return (0); | ||
187 | } | ||
188 | |||
189 | memset((char *) &server, 0, sizeof(server)); | 179 | memset((char *) &server, 0, sizeof(server)); |
190 | server.sin_family = AF_INET; | 180 | server.sin_family = AF_INET; |
191 | server.sin_port = htons((unsigned short) port); | 181 | server.sin_port = htons((unsigned short) port); |