From d4dbabb814cbf8b886f778834609aa614f48d502 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 15 Jul 2014 12:22:49 +0100 Subject: [PATCH] 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 (cherry picked from commit 58a2aaeade8bdecd0f9f0df41927f7cff3012547) --- apps/s_server.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/s_server.c b/apps/s_server.c index a399f5978f..e0ec5fa700 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1524,6 +1524,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 !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) if (jpake_secret) -- 2.25.1