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:27:29 +0100
commita214feb26bb94ed1fd20d2526ce33d806a8378f0 (patch)
tree53e728db8cd5e31d33c3d91fb90f721bd7283605 /apps
parent7a3a82dbbdaf78969eb15a6363b30a7584594740 (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 045c2bdd75..fe33b41f65 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1095,6 +1095,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
SSL_load_error_strings();
OpenSSL_add_ssl_algorithms();