summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-02 11:35:10 +0100
committerBodo Möller <bodo@openssl.org>2000-11-02 11:35:10 +0100
commit15d52ddb559223c87fe7bfaa5675b9e4ee05098f (patch)
treef6f41c0539128a21377776a1073240974f42d96f /apps/s_server.c
parent-t is supported, so display some help about it. (diff)
downloadopenssl-15d52ddb559223c87fe7bfaa5675b9e4ee05098f.tar.xz
openssl-15d52ddb559223c87fe7bfaa5675b9e4ee05098f.zip
Never call load_dh_param(NULL) because this leads to an illegal
fopen(NULL).
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 61a77dff11..7b6a2b0a2d 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -416,9 +416,6 @@ int MAIN(int argc, char *argv[])
int state=0;
SSL_METHOD *meth=NULL;
ENGINE *e=NULL;
-#ifndef NO_DH
- DH *dh=NULL;
-#endif
#if !defined(NO_SSL2) && !defined(NO_SSL3)
meth=SSLv23_server_method();
@@ -682,7 +679,13 @@ bad:
#ifndef NO_DH
if (!no_dhe)
{
- dh=load_dh_param(dhfile ? dhfile : s_cert_file);
+ DH *dh=NULL;
+
+ if (dhfile)
+ dh = load_dh_param(dhfile);
+ else if (s_cert_file)
+ dh = load_dh_param(s_cert_file);
+
if (dh != NULL)
{
BIO_printf(bio_s_out,"Setting temp DH parameters\n");