From 1bee18fcf4fef8122d4b7f0872497e0a15bc8d53 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 11 Mar 2015 23:53:10 +0100 Subject: m_ssl_openssl: Allow disabling SSLv3 via the config --- modules/extra/m_ssl_openssl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules/extra') diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 67ab6164c..c26c63655 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -162,6 +162,20 @@ class SSLModule : public Module Log() << "Unable to open private key " << this->keyfile; } + // Allow disabling SSLv3 + if (!config->Get("sslv3").empty()) + { + if (config->Get("sslv3")) + { + SSL_CTX_clear_options(client_ctx, SSL_OP_NO_SSLv3); + SSL_CTX_clear_options(server_ctx, SSL_OP_NO_SSLv3); + } + else + { + SSL_CTX_set_options(client_ctx, SSL_OP_NO_SSLv3); + SSL_CTX_set_options(server_ctx, SSL_OP_NO_SSLv3); + } + } } void OnPreServerConnect() anope_override -- cgit