summaryrefslogtreecommitdiff
path: root/modules/extra/ssl_openssl.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-07 19:24:28 -0400
committerAdam <Adam@anope.org>2016-10-07 19:24:28 -0400
commit66598d8d7e30eeffea1925ab11faaf0c77d07bec (patch)
treee409a8376d89341683680c8de6e998c6bf905013 /modules/extra/ssl_openssl.cpp
parentec1bb1c7ef1c971e2cc4bea65637ab3ed68bc81e (diff)
m_ssl_openssl: allow certificate chain files to be used
Diffstat (limited to 'modules/extra/ssl_openssl.cpp')
-rw-r--r--modules/extra/ssl_openssl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp
index 8958592e3..22f421d35 100644
--- a/modules/extra/ssl_openssl.cpp
+++ b/modules/extra/ssl_openssl.cpp
@@ -160,7 +160,7 @@ class SSLModule : public Module
if (Anope::IsFile(this->certfile.c_str()))
{
- if (!SSL_CTX_use_certificate_file(client_ctx, this->certfile.c_str(), SSL_FILETYPE_PEM) || !SSL_CTX_use_certificate_file(server_ctx, this->certfile.c_str(), SSL_FILETYPE_PEM))
+ if (!SSL_CTX_use_certificate_chain_file(client_ctx, this->certfile.c_str()) || !SSL_CTX_use_certificate_chain_file(server_ctx, this->certfile.c_str()))
throw ConfigException("Error loading certificate");
else
Log(LOG_DEBUG) << "m_ssl_openssl: Successfully loaded certificate " << this->certfile;