summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_apps.h
diff options
context:
space:
mode:
authortb <>2021-12-06 11:06:58 +0000
committertb <>2021-12-06 11:06:58 +0000
commit60a6a10467f5b7d56c92fe8e4133a6af9e9bd48f (patch)
tree55bcc3ded6ebb2898bb541a7b58b36f5c9bc096d /src/usr.bin/openssl/s_apps.h
parentf99574add34cb55c0297c6dcad8ed12e9eb18893 (diff)
downloadopenbsd-60a6a10467f5b7d56c92fe8e4133a6af9e9bd48f.tar.gz
openbsd-60a6a10467f5b7d56c92fe8e4133a6af9e9bd48f.tar.bz2
openbsd-60a6a10467f5b7d56c92fe8e4133a6af9e9bd48f.zip
Clean up a bunch of dead code in s_server.c and s_socket.c
jsg's analysis tool flagged a potential double free in do_server(). While this looks like a false positive, we can clean this code up a little: the host name passed to the callbacks isn't used by either sv_body() and www_body(), so it can be made local to do_accept() (an extra variable would not even be needed). Simplify the callbacks' signatures accordingly. Remove some commented out linger code that would never be used again anyway. ok inoguchi jsg
Diffstat (limited to 'src/usr.bin/openssl/s_apps.h')
-rw-r--r--src/usr.bin/openssl/s_apps.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/s_apps.h b/src/usr.bin/openssl/s_apps.h
index f535a35c39..a73c2eb1b4 100644
--- a/src/usr.bin/openssl/s_apps.h
+++ b/src/usr.bin/openssl/s_apps.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_apps.h,v 1.6 2021/08/29 12:33:15 tb Exp $ */ 1/* $OpenBSD: s_apps.h,v 1.7 2021/12/06 11:06:58 tb 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 *
@@ -119,7 +119,7 @@ extern int verify_depth;
119extern int verify_return_error; 119extern int verify_return_error;
120 120
121int do_server(int port, int type, int *ret, 121int do_server(int port, int type, int *ret,
122 int (*cb)(char *hostname, int s, unsigned char *context), 122 int (*cb)(int s, unsigned char *context),
123 unsigned char *context, int naccept); 123 unsigned char *context, int naccept);
124#ifdef HEADER_X509_H 124#ifdef HEADER_X509_H
125int verify_callback(int ok, X509_STORE_CTX *ctx); 125int verify_callback(int ok, X509_STORE_CTX *ctx);