kumquat-buildroot/package/znc/0003-DH_set0_pqg-and-DH_get0_key-have-existed-since-Libre.patch
Bernd Kuhls dfc3b05c05 package/znc: Fix build with LibreSSL
Fixes:
http://autobuild.buildroot.net/results/3fe/3fec5c3a21af47b5f4e8adcaf4ce1fff5070e00a/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-03-10 20:52:13 +01:00

31 lines
1.3 KiB
Diff

From 7c8ac8981a8516edaba469641aff4d8ec452ae9e Mon Sep 17 00:00:00 2001
From: Charlie Li <git@vishwin.info>
Date: Mon, 14 Mar 2022 18:32:46 -0400
Subject: [PATCH] DH_set0_pqg and DH_get0_key have existed since LibreSSL 2.7
https://github.com/libressl-portable/openbsd/commit/848e2a019c796b685fc8c5848283b86e48fbe0bf
https://github.com/libressl-portable/openbsd/commit/3789e379353c1d53313a249461b3d735de4ac742
Downloaded from upstream commit
https://github.com/znc/znc/commit/7c8ac8981a8516edaba469641aff4d8ec452ae9e
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
modules/crypt.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/crypt.cpp b/modules/crypt.cpp
index 7655371b6e..68f7aafcea 100644
--- a/modules/crypt.cpp
+++ b/modules/crypt.cpp
@@ -68,7 +68,8 @@ class CCryptMod : public CModule {
CString m_sPrivKey;
CString m_sPubKey;
-#if OPENSSL_VERSION_NUMBER < 0X10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0X10100000L || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x02070000fL)
static int DH_set0_pqg(DH* dh, BIGNUM* p, BIGNUM* q, BIGNUM* g) {
/* If the fields p and g in dh are nullptr, the corresponding input
* parameters MUST be non-nullptr. q may remain nullptr.