summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-16 00:57:14 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-16 00:57:14 +0000
commit1a586eb091095e5d45719f5cd7de3949a94eeea1 (patch)
tree2056b31a91894c05d7f73a24a3f871afc83c2196 /src/modules/extra
parent594036b9bd76c379032ac2473c84c36a011febe3 (diff)
Fix for m_ssl_openssl dying if the DH params file doesn't exist, compiles but untested cause I'm sleepy :(
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4014 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-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);
}