packages/net/dnsdist/patches/300-openssl-deprecated.patch
Rosen Penev 3e6e4b622e dnsdist: Fix several issues
Add patch that detects when -latomic is needed.

Fix compilation without deprecated OpenSSL APIs.

Hard-code lua to avoid luajit dependency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-05-29 13:35:31 -07:00

29 lines
701 B
Diff

--- a/tcpiohandler.cc
+++ b/tcpiohandler.cc
@@ -369,8 +369,10 @@ public:
}
if (s_users.fetch_add(1) == 0) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_load_crypto_strings();
OpenSSL_add_ssl_algorithms();
+#endif
openssl_thread_setup();
s_ticketsKeyIndex = SSL_CTX_get_ex_new_index(0, nullptr, nullptr, nullptr, nullptr);
@@ -439,6 +441,7 @@ public:
d_tlsCtx.reset();
if (s_users.fetch_sub(1) == 1) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_free_strings();
EVP_cleanup();
@@ -448,6 +451,7 @@ public:
CONF_modules_unload(1);
CRYPTO_cleanup_all_ex_data();
+#endif
openssl_thread_cleanup();
}
}