znc: Update deprecated API patch
ENGINE_cleanup is unavailable when deprecated APIs and ENGINE support are disabled. The cleanup functions are unnecessary with OpenSSL 1.1. The getm functions use a faulty if directive. Work around it. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
a816d32107
commit
e0d392f5b7
2 changed files with 20 additions and 5 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=znc
|
PKG_NAME:=znc
|
||||||
PKG_VERSION:=1.7.3
|
PKG_VERSION:=1.7.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://znc.in/releases \
|
PKG_SOURCE_URL:=https://znc.in/releases \
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
--- a/src/Utils.cpp
|
||||||
|
+++ b/src/Utils.cpp
|
||||||
|
@@ -29,7 +29,7 @@
|
||||||
|
#include <openssl/ssl.h>
|
||||||
|
#include <openssl/bn.h>
|
||||||
|
#include <openssl/rsa.h>
|
||||||
|
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||||
|
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||||
|
#define X509_getm_notBefore X509_get_notBefore
|
||||||
|
#define X509_getm_notAfter X509_get_notAfter
|
||||||
|
#endif
|
||||||
--- a/third_party/Csocket/Csocket.cc
|
--- a/third_party/Csocket/Csocket.cc
|
||||||
+++ b/third_party/Csocket/Csocket.cc
|
+++ b/third_party/Csocket/Csocket.cc
|
||||||
@@ -47,10 +47,16 @@
|
@@ -47,10 +47,16 @@
|
||||||
|
@ -18,11 +29,15 @@
|
||||||
#define HAVE_ERR_REMOVE_STATE
|
#define HAVE_ERR_REMOVE_STATE
|
||||||
#ifdef OPENSSL_VERSION_NUMBER
|
#ifdef OPENSSL_VERSION_NUMBER
|
||||||
# if OPENSSL_VERSION_NUMBER >= 0x10000000
|
# if OPENSSL_VERSION_NUMBER >= 0x10000000
|
||||||
@@ -594,9 +600,11 @@ void ShutdownCsocket()
|
@@ -583,6 +589,7 @@ bool InitCsocket()
|
||||||
#ifndef OPENSSL_IS_BORINGSSL
|
void ShutdownCsocket()
|
||||||
CONF_modules_unload( 1 );
|
{
|
||||||
#endif
|
#ifdef HAVE_LIBSSL
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
#if defined( HAVE_ERR_REMOVE_THREAD_STATE )
|
||||||
|
ERR_remove_thread_state( NULL );
|
||||||
|
#elif defined( HAVE_ERR_REMOVE_STATE )
|
||||||
|
@@ -597,6 +604,7 @@ void ShutdownCsocket()
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
|
|
Loading…
Reference in a new issue