aboutsummaryrefslogtreecommitdiff
path: root/net/znc/patches
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2019-02-06 20:06:41 +0100
committerJonas Gorski <jonas.gorski@gmail.com>2019-02-06 20:09:59 +0100
commite4ab7b4fec306b2a552b993cd37eb1c2018d2002 (patch)
tree58b8939d6a46056293db74c029174a10aa3e40c3 /net/znc/patches
parent14aa71fc7b86fbb63b7aac7e5e48f4dc10982880 (diff)
znc: fix patches applying
git is hard. :-( Reported-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> Fixes: 4629f043e08e ("znc: update to 1.7.2") Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'net/znc/patches')
-rw-r--r--net/znc/patches/104-disable-empty-modules-check.patch2
-rw-r--r--net/znc/patches/120-openssl-deprecated.patch71
2 files changed, 1 insertions, 72 deletions
diff --git a/net/znc/patches/104-disable-empty-modules-check.patch b/net/znc/patches/104-disable-empty-modules-check.patch
index 6395af591..ea6247296 100644
--- a/net/znc/patches/104-disable-empty-modules-check.patch
+++ b/net/znc/patches/104-disable-empty-modules-check.patch
@@ -1,6 +1,6 @@
--- a/src/main.cpp
+++ b/src/main.cpp
-@@ -412,12 +412,14 @@ int main(int argc, char** argv) {
+@@ -422,12 +422,14 @@ int main(int argc, char** argv) {
"No modules found. Perhaps you didn't install ZNC properly?");
CUtils::PrintError(
"Read https://wiki.znc.in/Installation for instructions.");
diff --git a/net/znc/patches/120-openssl-deprecated.patch b/net/znc/patches/120-openssl-deprecated.patch
index 9c206f7f0..c8fdda855 100644
--- a/net/znc/patches/120-openssl-deprecated.patch
+++ b/net/znc/patches/120-openssl-deprecated.patch
@@ -1,74 +1,3 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -368,8 +368,9 @@ if test "x$SSL" != "xno"; then
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
- #include <openssl/ssl.h>
-+ #include <openssl/dh.h>
- ]], [[
-- SSL_CTX* ctx = SSL_CTX_new(TLSv1_method());
-+ SSL_CTX* ctx = SSL_CTX_new(SSLv23_method());
- SSL* ssl = SSL_new(ctx);
- DH* dh = DH_new();
- DH_free(dh);
---- a/include/znc/Utils.h
-+++ b/include/znc/Utils.h
-@@ -219,6 +219,11 @@ class CTable : protected std::vector<std::vector<CString>> {
- #include <openssl/aes.h>
- #include <openssl/blowfish.h>
- #include <openssl/md5.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- //! does Blowfish w/64 bit feedback, no padding
- class CBlowfish {
- public:
---- a/src/Utils.cpp
-+++ b/src/Utils.cpp
-@@ -27,6 +27,8 @@
- #include <znc/Message.h>
- #ifdef HAVE_LIBSSL
- #include <openssl/ssl.h>
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #endif /* HAVE_LIBSSL */
- #include <memory>
- #include <unistd.h>
-@@ -93,8 +95,8 @@ void CUtils::GenerateCert(FILE* pOut, const CString& sHost) {
-
- X509_set_version(pCert.get(), 2);
- ASN1_INTEGER_set(X509_get_serialNumber(pCert.get()), serial);
-- X509_gmtime_adj(X509_get_notBefore(pCert.get()), 0);
-- X509_gmtime_adj(X509_get_notAfter(pCert.get()),
-+ X509_gmtime_adj(X509_getm_notBefore(pCert.get()), 0);
-+ X509_gmtime_adj(X509_getm_notAfter(pCert.get()),
- (long)60 * 60 * 24 * days * years);
- X509_set_pubkey(pCert.get(), pKey.get());
-
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -46,8 +46,8 @@ static void locking_callback(int mode, int type, const char* file, int line) {
- }
- }
-
--static unsigned long thread_id_callback() {
-- return (unsigned long)pthread_self();
-+static void thread_id_callback(CRYPTO_THREADID *id) {
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
- }
-
- static CRYPTO_dynlock_value* dyn_create_callback(const char* file, int line) {
-@@ -78,7 +78,7 @@ static void thread_setup() {
- for (std::unique_ptr<CMutex>& mtx : lock_cs)
- mtx = std::unique_ptr<CMutex>(new CMutex());
-
-- CRYPTO_set_id_callback(&thread_id_callback);
-+ CRYPTO_THREADID_set_callback(&thread_id_callback);
- CRYPTO_set_locking_callback(&locking_callback);
-
- CRYPTO_set_dynlock_create_callback(&dyn_create_callback);
--- a/third_party/Csocket/Csocket.cc
+++ b/third_party/Csocket/Csocket.cc
@@ -47,10 +47,16 @@