Don't allow -www etc options with DTLS.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 15 Jul 2014 11:22:49 +0000 (12:22 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 15 Jul 2014 11:32:41 +0000 (12:32 +0100)
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

apps/s_server.c

index 9d1a1fa87ce508d1dd5d9af5b03a662cdffa40fa..639bb90c599f4687af1c204be6238b2f62b3e546 100644 (file)
@@ -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))
                {