summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-07-15 12:22:49 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-07-15 12:25:39 +0100
commitcd63f94d4df04d2a15e8386658448c93f39b63d2 (patch)
tree7d64d8ceb3821a4c6c0f3171f17c732bc6d3f108 /apps
parent2054eb771ea29378f90d3a77c2f4015b17de702d (diff)
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)
Diffstat (limited to 'apps')
-rw-r--r--apps/s_server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index a399d57a05..fe7ad88232 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1362,6 +1362,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)