From: Dr. Stephen Henson Date: Tue, 15 Jul 2014 11:22:49 +0000 (+0100) Subject: Don't allow -www etc options with DTLS. X-Git-Tag: master-post-reformat~586 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=199772e53427ca921c289471c1344d454781fcc0 Don't allow -www etc options with DTLS. The options which emulate a web server don't make sense when doing DTLS. Exit with an error if an attempt is made to use them. PR#3453 --- diff --git a/apps/s_server.c b/apps/s_server.c index 9d1a1fa87c..639bb90c59 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1532,6 +1532,14 @@ bad: sv_usage(); goto end; } +#ifndef OPENSSL_NO_DTLS1 + if (www && socket_type == SOCK_DGRAM) + { + BIO_printf(bio_err, + "Can't use -HTTP, -www or -WWW with DTLS\n"); + goto end; + } +#endif if (unix_path && (socket_type != SOCK_STREAM)) {