Merge pull request #4683 from pprindeville/bind-build-deprecated
bind: patch unneeded if openssl is build w/ deprecated
This commit is contained in:
commit
65b15431f2
2 changed files with 3 additions and 52 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=bind
|
PKG_NAME:=bind
|
||||||
PKG_VERSION:=9.11.2
|
PKG_VERSION:=9.11.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
USERID:=bind=57:bind=57
|
USERID:=bind=57:bind=57
|
||||||
|
|
||||||
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
|
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
|
||||||
|
@ -29,7 +29,6 @@ PKG_INSTALL:=1
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS := \
|
PKG_CONFIG_DEPENDS := \
|
||||||
CONFIG_OPENSSL_WITH_EC \
|
|
||||||
CONFIG_BIND_ENABLE_FILTER_AAAA
|
CONFIG_BIND_ENABLE_FILTER_AAAA
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -37,7 +36,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||||
define Package/bind/Default
|
define Package/bind/Default
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+bind-libs
|
DEPENDS:=+bind-libs +@OPENSSL_WITH_EC
|
||||||
TITLE:=bind
|
TITLE:=bind
|
||||||
URL:=https://www.isc.org/software/bind
|
URL:=https://www.isc.org/software/bind
|
||||||
SUBMENU:=IP Addresses and Names
|
SUBMENU:=IP Addresses and Names
|
||||||
|
@ -54,6 +53,7 @@ endef
|
||||||
define Package/bind-server
|
define Package/bind-server
|
||||||
$(call Package/bind/Default)
|
$(call Package/bind/Default)
|
||||||
TITLE+= DNS server
|
TITLE+= DNS server
|
||||||
|
DEPENDS+= +@OPENSSL_WITH_DEPRECATED
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/bind-server/config
|
define Package/bind-server/config
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
--- a/lib/dns/openssl_link.c 2017-07-07 09:02:06.000000000 -0600
|
|
||||||
+++ b/lib/dns/openssl_link.c 2017-08-07 10:23:18.886182931 -0600
|
|
||||||
@@ -177,6 +177,14 @@ mem_realloc(void *ptr, size_t size FLARG
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
|
||||||
+static void
|
|
||||||
+_set_thread_id(CRYPTO_THREADID *id)
|
|
||||||
+{
|
|
||||||
+ CRYPTO_THREADID_set_numeric(id, pthread_self());
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
isc_result_t
|
|
||||||
dst__openssl_init(const char *engine) {
|
|
||||||
isc_result_t result;
|
|
||||||
@@ -193,7 +203,7 @@ dst__openssl_init(const char *engine) {
|
|
||||||
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
|
|
||||||
#endif
|
|
||||||
CRYPTO_set_mem_functions(mem_alloc, mem_realloc, mem_free);
|
|
||||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
+#if defined(OPENSSL_VERSION_NUMBER) || defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
nlocks = CRYPTO_num_locks();
|
|
||||||
locks = mem_alloc(sizeof(isc_mutex_t) * nlocks FILELINE);
|
|
||||||
if (locks == NULL)
|
|
||||||
@@ -202,7 +204,11 @@ dst__openssl_init(const char *engine) {
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
goto cleanup_mutexalloc;
|
|
||||||
CRYPTO_set_locking_callback(lock_callback);
|
|
||||||
+# if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
|
||||||
+ CRYPTO_THREADID_set_callback(_set_thread_id);
|
|
||||||
+# else
|
|
||||||
CRYPTO_set_id_callback(id_callback);
|
|
||||||
+# endif
|
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
|
||||||
#endif
|
|
||||||
@@ -323,7 +335,9 @@ dst__openssl_destroy(void) {
|
|
||||||
CRYPTO_cleanup_all_ex_data();
|
|
||||||
#endif
|
|
||||||
ERR_clear_error();
|
|
||||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
+#if OPENSSL_VERSION >= 0x10000000L
|
|
||||||
+ ERR_remove_thread_state(NULL);
|
|
||||||
+#elif OPENSSL_VERSION_NUMBER < 0x10000000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
ERR_remove_state(0);
|
|
||||||
#endif
|
|
||||||
ERR_free_strings();
|
|
Loading…
Reference in a new issue