summaryrefslogtreecommitdiff
path: root/net/unbound
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-11-01 15:48:19 -0700
committerRosen Penev <rosenp@gmail.com>2018-11-05 16:32:11 -0800
commit1200c508fbae80c1bdf803337bb5f3a243bf2b06 (patch)
tree3a855f8c419b3b514dab1c250b353e80f7f5cd98 /net/unbound
parent9753c21d5c73a2a53a866fd8ee706acdddf90d6d (diff)
unbound: Remove deprecated OpenSSL API
This will become pointless once OpenSSL 1.1.1 enters the tree. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'net/unbound')
-rw-r--r--net/unbound/Makefile2
-rw-r--r--net/unbound/patches/200-openssl-deprecated.patch49
2 files changed, 50 insertions, 1 deletions
diff --git a/net/unbound/Makefile b/net/unbound/Makefile
index e89afc7e1..e492c1372 100644
--- a/net/unbound/Makefile
+++ b/net/unbound/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
PKG_VERSION:=1.8.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
diff --git a/net/unbound/patches/200-openssl-deprecated.patch b/net/unbound/patches/200-openssl-deprecated.patch
new file mode 100644
index 000000000..118a82ccc
--- /dev/null
+++ b/net/unbound/patches/200-openssl-deprecated.patch
@@ -0,0 +1,49 @@
+diff --git a/daemon/daemon.c b/daemon/daemon.c
+index 4c3d5f1..50f5060 100644
+--- a/daemon/daemon.c
++++ b/daemon/daemon.c
+@@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon)
+ # endif
+ # ifdef HAVE_OPENSSL_CONFIG
+ EVP_cleanup();
+-# if OPENSSL_VERSION_NUMBER < 0x10100000
++# if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE)
+ ENGINE_cleanup();
+ # endif
+ CONF_modules_free();
+diff --git a/util/net_help.c b/util/net_help.c
+index 91368c8..a932010 100644
+--- a/util/net_help.c
++++ b/util/net_help.c
+@@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
+ static lock_basic_type *ub_openssl_locks = NULL;
+
+ /** callback that gets thread id for openssl */
+-static unsigned long
+-ub_crypto_id_cb(void)
++static void
++ub_crypto_id_cb(CRYPTO_THREADID *id)
+ {
+- return (unsigned long)log_thread_get();
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
+ }
+
+ static void
+@@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void)
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_init(&ub_openssl_locks[i]);
+ }
+- CRYPTO_set_id_callback(&ub_crypto_id_cb);
++ CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
+ CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
+ #endif /* OPENSSL_THREADS */
+ return 1;
+@@ -1047,7 +1047,7 @@ void ub_openssl_lock_delete(void)
+ int i;
+ if(!ub_openssl_locks)
+ return;
+- CRYPTO_set_id_callback(NULL);
++ CRYPTO_THREADID_set_callback(NULL);
+ CRYPTO_set_locking_callback(NULL);
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_destroy(&ub_openssl_locks[i]);