summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/usr.bin/openssl/s_socket.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/usr.bin/openssl/s_socket.c b/src/usr.bin/openssl/s_socket.c
index 48af178a23..2ce31eb5ef 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.1 2014/08/26 17:47:25 jsing Exp $ */ 1/* $OpenBSD: s_socket.c,v 1.2 2014/11/06 13:46:09 jsing 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 *
@@ -73,28 +73,18 @@
73 73
74#include "s_apps.h" 74#include "s_apps.h"
75 75
76static int ssl_sock_init(void);
77static int init_server(int *sock, int port, int type); 76static int init_server(int *sock, int port, int type);
78static int init_server_long(int *sock, int port, char *ip, int type); 77static int init_server_long(int *sock, int port, char *ip, int type);
79static int do_accept(int acc_sock, int *sock, char **host); 78static int do_accept(int acc_sock, int *sock, char **host);
80 79
81#define SOCKET_PROTOCOL IPPROTO_TCP 80#define SOCKET_PROTOCOL IPPROTO_TCP
82 81
83static int
84ssl_sock_init(void)
85{
86 return (1);
87}
88
89int 82int
90init_client(int *sock, char *host, char *port, int type, int af) 83init_client(int *sock, char *host, char *port, int type, int af)
91{ 84{
92 struct addrinfo hints, *ai_top, *ai; 85 struct addrinfo hints, *ai_top, *ai;
93 int i, s; 86 int i, s;
94 87
95 if (!ssl_sock_init())
96 return (0);
97
98 memset(&hints, '\0', sizeof(hints)); 88 memset(&hints, '\0', sizeof(hints));
99 hints.ai_family = af; 89 hints.ai_family = af;
100 hints.ai_socktype = type; 90 hints.ai_socktype = type;
@@ -186,9 +176,6 @@ init_server_long(int *sock, int port, char *ip, int type)
186 struct sockaddr_in server; 176 struct sockaddr_in server;
187 int s = -1; 177 int s = -1;
188 178
189 if (!ssl_sock_init())
190 return (0);
191
192 memset((char *) &server, 0, sizeof(server)); 179 memset((char *) &server, 0, sizeof(server));
193 server.sin_family = AF_INET; 180 server.sin_family = AF_INET;
194 server.sin_port = htons((unsigned short) port); 181 server.sin_port = htons((unsigned short) port);
@@ -243,9 +230,6 @@ do_accept(int acc_sock, int *sock, char **host)
243 socklen_t len; 230 socklen_t len;
244/* struct linger ling; */ 231/* struct linger ling; */
245 232
246 if (!ssl_sock_init())
247 return (0);
248
249redoit: 233redoit:
250 234
251 memset((char *) &from, 0, sizeof(from)); 235 memset((char *) &from, 0, sizeof(from));