diff options
author | Sadie Powell <sadie@witchery.services> | 2024-01-09 21:09:42 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-01-09 21:25:44 +0000 |
commit | 710e7dd3a2b59afd7a2b49aef83aedb89050c704 (patch) | |
tree | a1d11dd442ec76c4fb2ab5648b04e5dc3b84b7b1 /modules/extra/m_ssl_openssl.cpp | |
parent | 1e9c6d7931644b6becf05de800d9e74d59df3d2c (diff) |
Bump the minimum OpenSSL version to 1.1.
Diffstat (limited to 'modules/extra/m_ssl_openssl.cpp')
-rw-r--r-- | modules/extra/m_ssl_openssl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 9d1f81988..12cff478b 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -12,7 +12,9 @@ #include "module.h" #include "modules/ssl.h" -#define OPENSSL_NO_SHA512 +#define OPENSSL_API_COMPAT 0x10100000L +#define OPENSSL_NO_DEPRECATED + #include <openssl/bio.h> #include <openssl/ssl.h> #include <openssl/err.h> @@ -102,11 +104,10 @@ public: this->SetPermanent(true); - SSL_library_init(); - SSL_load_error_strings(); + OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, nullptr); - client_ctx = SSL_CTX_new(SSLv23_client_method()); - server_ctx = SSL_CTX_new(SSLv23_server_method()); + client_ctx = SSL_CTX_new(TLS_client_method()); + server_ctx = SSL_CTX_new(TLS_server_method()); if (!client_ctx || !server_ctx) throw ModuleException("Error initializing SSL CTX"); |