summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-09-19 22:03:15 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-09-20 12:50:55 +0100
commit37f3a3b3276bba468d26c968e5c676aaf57ffd82 (patch)
treefc2f33ddce05305177622b99f2cd8882e6315f12 /apps/s_server.c
parent8f463dbddd67eb86b4fdf49893132fdcc6d219bc (diff)
make no-dh work
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 9e4a18636d..8e15f5b63d 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -973,7 +973,10 @@ int s_server_main(int argc, char *argv[])
X509 *s_cert = NULL, *s_dcert = NULL;
X509_VERIFY_PARAM *vpm = NULL;
char *CApath = NULL, *CAfile = NULL, *chCApath = NULL, *chCAfile = NULL;
- char *dhfile = NULL, *dpassarg = NULL, *dpass = NULL, *inrand = NULL;
+#ifndef OPENSSL_NO_DH
+ char *dhfile = NULL;
+#endif
+ char *dpassarg = NULL, *dpass = NULL, *inrand = NULL;
char *passarg = NULL, *pass = NULL, *vfyCApath = NULL, *vfyCAfile = NULL;
char *crl_file = NULL, *prog;
#ifndef OPENSSL_NO_PSK
@@ -986,7 +989,10 @@ int s_server_main(int argc, char *argv[])
int (*server_cb) (char *hostname, int s, int stype,
unsigned char *context);
int vpmtouched = 0, build_chain = 0, no_cache = 0, ext_cache = 0;
- int no_tmp_rsa = 0, no_dhe = 0, no_ecdhe = 0, nocert = 0, ret = 1;
+#ifndef OPENSSL_NO_DH
+ int no_dhe = 0;
+#endif
+ int no_tmp_rsa = 0, no_ecdhe = 0, nocert = 0, ret = 1;
int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
int s_dcert_format = FORMAT_PEM, s_dkey_format = FORMAT_PEM;
int rev = 0, naccept = -1, sdebug = 0, socket_type = SOCK_STREAM;
@@ -1119,7 +1125,9 @@ int s_server_main(int argc, char *argv[])
s_chain_file = opt_arg();
break;
case OPT_DHPARAM:
+#ifndef OPENSSL_NO_DH
dhfile = opt_arg();
+#endif
break;
case OPT_DCERTFORM:
if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &s_dcert_format))
@@ -1272,7 +1280,9 @@ int s_server_main(int argc, char *argv[])
no_tmp_rsa = 1;
break;
case OPT_NO_DHE:
+#ifndef OPENSSL_NO_DH
no_dhe = 1;
+#endif
break;
case OPT_NO_ECDHE:
no_ecdhe = 1;