summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index d1fddba74..f40a772a4 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -197,18 +197,19 @@ class ModuleSSLOpenSSL : public Module
if(dhpfile == NULL)
{
log(DEFAULT, "m_ssl_openssl.so Couldn't open DH file %s: %s", dhfile.c_str(), strerror(errno));
+ throw ModuleException();
}
else
{
ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL);
+
+ if(SSL_CTX_set_tmp_dh(ctx, ret) < 0)
+ {
+ log(DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters");
+ }
}
fclose(dhpfile);
-
- if(SSL_CTX_set_tmp_dh(ctx, ret) < 0)
- {
- log(DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters");
- }
DELETE(Conf);
}