Bläddra i källkod

package/aircrack-ng: fix build with libressl >= 3.5.0

Fix the following build failure with libressl raised since bump to
version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2:

lib/crypto/crypto.c: In function 'calc_mic':
lib/crypto/crypto.c:203:2: error: variable 'ctx' has initializer but incomplete type
  203 |  HMAC_CTX ctx = {0};
      |  ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/d8444dada84a54205273ac627d3e4f4692a55364

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Fabrice Fontaine 3 år sedan
förälder
incheckning
c4077fc834

+ 35 - 0
package/aircrack-ng/0003-lib-crypto-crypto.c-fx-build-with-libressl-3.5.0.patch

@@ -0,0 +1,35 @@
+From cbfe47193bbab1f82fafb4b83c3d159a0f1fe03d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 3 May 2022 01:34:41 +0200
+Subject: [PATCH] lib/crypto/crypto.c: fx build with libressl >= 3.5.0 (#2310)
+
+Fix the following build failure with libressl >= 3.5.0:
+
+lib/crypto/crypto.c: In function 'calc_mic':
+lib/crypto/crypto.c:203:2: error: variable 'ctx' has initializer but incomplete type
+  203 |  HMAC_CTX ctx = {0};
+      |  ^~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d8444dada84a54205273ac627d3e4f4692a55364
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/aircrack-ng/aircrack-ng/commit/cbfe47193bbab1f82fafb4b83c3d159a0f1fe03d]
+---
+ lib/crypto/crypto.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/crypto/crypto.c b/lib/crypto/crypto.c
+index df2c1bf41..52bc5e5ac 100644
+--- a/lib/crypto/crypto.c
++++ b/lib/crypto/crypto.c
+@@ -196,7 +196,7 @@ void calc_mic(struct AP_info * ap,
+ 	int i;
+ 	unsigned char pke[100];
+ #if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L                \
+-	|| defined(LIBRESSL_VERSION_NUMBER)
++	|| (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
+ #define HMAC_USE_NO_PTR
+ #endif
+