summaryrefslogtreecommitdiff
path: root/lib/server/TLSContext.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2018-02-25 08:18:34 +0000
committerChris Wilson <chris+github@qwirx.com>2018-02-25 08:18:34 +0000
commitbc48bec97b65534966da74a07ed3edb3f13f6263 (patch)
tree387b7b54d15fa2f646366a51ada52034ea26fa6f /lib/server/TLSContext.cpp
parent6d7e9562e8485591a4888f1fc2d3c6c657dc7a01 (diff)
Revert "Add support for OpenSSL 1.1 and replace deprecated function calls"
Until shown to be safe. See message from Johann Glaser to the mailing list. This reverts commit 85e7efc3fa0477f60318d2cd2144503a9ea8feb9.
Diffstat (limited to 'lib/server/TLSContext.cpp')
-rw-r--r--lib/server/TLSContext.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/server/TLSContext.cpp b/lib/server/TLSContext.cpp
index 1a6d4a53..35e254fd 100644
--- a/lib/server/TLSContext.cpp
+++ b/lib/server/TLSContext.cpp
@@ -23,17 +23,6 @@
#define MAX_VERIFICATION_DEPTH 2
#define CIPHER_LIST "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
-// Macros to allow compatibility with OpenSSL 1.0 and 1.1 APIs. See
-// https://github.com/charybdis-ircd/charybdis/blob/release/3.5/libratbox/src/openssl_ratbox.h
-// for the gory details.
-#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER >= 0x10100000L) // OpenSSL >= 1.1
-# define BOX_TLS_SERVER_METHOD TLS_server_method
-# define BOX_TLS_CLIENT_METHOD TLS_client_method
-#else // OpenSSL < 1.1
-# define BOX_TLS_SERVER_METHOD TLSv1_server_method
-# define BOX_TLS_CLIENT_METHOD TLSv1_client_method
-#endif
-
// --------------------------------------------------------------------------
//
// Function
@@ -78,7 +67,7 @@ void TLSContext::Initialise(bool AsServer, const char *CertificatesFile, const c
::SSL_CTX_free(mpContext);
}
- mpContext = ::SSL_CTX_new(AsServer ? BOX_TLS_SERVER_METHOD() : BOX_TLS_CLIENT_METHOD());
+ mpContext = ::SSL_CTX_new(AsServer?TLSv1_server_method():TLSv1_client_method());
if(mpContext == NULL)
{
THROW_EXCEPTION(ServerException, TLSAllocationFailed)