summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2020-10-02 15:43:48 +0000
committertb <>2020-10-02 15:43:48 +0000
commit3d91b288cd86686f4b7c3038882c3284be0de26b (patch)
treea6328cf8b21efffd2815e691640952536d963c88
parent1e6631e64ad0c7d8e96441fe5ec6a0440f5c6ec6 (diff)
downloadopenbsd-3d91b288cd86686f4b7c3038882c3284be0de26b.tar.gz
openbsd-3d91b288cd86686f4b7c3038882c3284be0de26b.tar.bz2
openbsd-3d91b288cd86686f4b7c3038882c3284be0de26b.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--src/usr.bin/openssl/s_server.c10
1 files changed, 9 insertions, 1 deletions
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 @@
1/* $OpenBSD: s_server.c,v 1.43 2020/07/27 13:46:48 inoguchi Exp $ */ 1/* $OpenBSD: s_server.c,v 1.44 2020/10/02 15:43:48 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 *
@@ -473,6 +473,14 @@ s_server_opt_verify_param(int argc, char **argv, int *argsused)
473 473
474static const struct option s_server_options[] = { 474static const struct option s_server_options[] = {
475 { 475 {
476 .name = "4",
477 .type = OPTION_DISCARD,
478 },
479 {
480 .name = "6",
481 .type = OPTION_DISCARD,
482 },
483 {
476 .name = "accept", 484 .name = "accept",
477 .argname = "port", 485 .argname = "port",
478 .desc = "Port to accept on (default is 4433)", 486 .desc = "Port to accept on (default is 4433)",