From 3d91b288cd86686f4b7c3038882c3284be0de26b Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 2 Oct 2020 15:43:48 +0000 Subject: 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 --- src/usr.bin/openssl/s_server.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index 95e96429ce..4d4bed60ac 100644 --- a/src/usr.bin/openssl/s_server.c +++ b/src/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. * @@ -472,6 +472,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", -- cgit v1.2.3-55-g6feb