summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-10-02 15:43:48 +0000
committertb <tb@openbsd.org>2020-10-02 15:43:48 +0000
commit80b7bf82b9152438ccc25ebcb069fb1da1f0f912 (patch)
tree384ac2d383108d735fcd2796441bc2c7b0d830e8
parentAdd possibility to link and run this test against the OpenSSL 1.1.1 package (diff)
downloadwireguard-openbsd-80b7bf82b9152438ccc25ebcb069fb1da1f0f912.tar.xz
wireguard-openbsd-80b7bf82b9152438ccc25ebcb069fb1da1f0f912.zip
Add -[46] nops for compatibility with the OpenSSL s_server
On OpenBSD it's necessary to use the eopenssl11 s_server with either -4 or -6 to choose an address family. I often want to try something with an OpenSSL server and then test the same thing with LibreSSL or vice versa. Adding and removing -4s on top of editing the command is annoying and distracting. This commits teaches our s_server to ignore -4 and -6 and thus makes commands that work with eopenssl11 more likely to work with openssl(1). These options are deliberately undocumented and don't show up in help listings. ok bcook inoguchi jsing
-rw-r--r--usr.bin/openssl/s_server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/openssl/s_server.c b/usr.bin/openssl/s_server.c
index 95e96429cef..4d4bed60ac7 100644
--- a/usr.bin/openssl/s_server.c
+++ b/usr.bin/openssl/s_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_server.c,v 1.43 2020/07/27 13:46:48 inoguchi Exp $ */
+/* $OpenBSD: s_server.c,v 1.44 2020/10/02 15:43:48 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -473,6 +473,14 @@ s_server_opt_verify_param(int argc, char **argv, int *argsused)
static const struct option s_server_options[] = {
{
+ .name = "4",
+ .type = OPTION_DISCARD,
+ },
+ {
+ .name = "6",
+ .type = OPTION_DISCARD,
+ },
+ {
.name = "accept",
.argname = "port",
.desc = "Port to accept on (default is 4433)",