From a3234082ca1ac57c73464f00b84478c76802777c Mon Sep 17 00:00:00 2001 From: bcook <> Date: Sun, 22 Mar 2015 10:36:22 +0000 Subject: 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 --- src/usr.bin/openssl/s_socket.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/usr.bin/openssl/s_socket.c') 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 @@ -/* $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); -- cgit v1.2.3-55-g6feb