diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-10-02 15:43:49 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-10-02 15:43:49 +0000 |
commit | 376fed6ad8b05c6f02ddf3e9bd1da4f24dad7f0a (patch) | |
tree | 1ec6fbfa3b8e6c9af5b731544c218ba4f3a6e24c | |
parent | 674f8de0cf5f04a6483bee536b745d98f222e819 (diff) |
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.c | 10 |
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)", |