aboutsummaryrefslogtreecommitdiff
path: root/net/aircrack-ng
diff options
context:
space:
mode:
authorEneas U de Queiroz <cote2004-github@yahoo.com>2018-05-24 22:19:13 -0300
committerEneas U de Queiroz <cote2004-github@yahoo.com>2018-05-24 22:19:13 -0300
commit168ccaafbf9f25f8b88fa0410a72cff3e9debffd (patch)
treed4d57c7aca48cadeff8607c2e3ef011b3cdcf0cd /net/aircrack-ng
parentd9e9b59159309449df7a7a6d4ab87980dc16eac2 (diff)
aircrack-ng: adds openssl 1.1 compatibility
Applied a patch that was merged upstream. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Diffstat (limited to 'net/aircrack-ng')
-rw-r--r--net/aircrack-ng/Makefile2
-rw-r--r--net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch59
2 files changed, 60 insertions, 1 deletions
diff --git a/net/aircrack-ng/Makefile b/net/aircrack-ng/Makefile
index 7e472fb3c..ad2e0430f 100644
--- a/net/aircrack-ng/Makefile
+++ b/net/aircrack-ng/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.2-rc1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
diff --git a/net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch b/net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch
new file mode 100644
index 000000000..53b6e02d4
--- /dev/null
+++ b/net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch
@@ -0,0 +1,59 @@
+From 9a1846507ff043c397257206ff21adae90a122f4 Mon Sep 17 00:00:00 2001
+From: Thomas d'Otreppe <tdotreppe@aircrack-ng.org>
+Date: Wed, 21 Dec 2016 00:18:46 +0000
+Subject: [PATCH] Fixed compilation with OpenSSL 1.1.0 (Closes: #1711).
+
+git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab
+---
+ src/crypto.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/src/crypto.c b/src/crypto.c
+index c3318753..46fa9c52 100644
+--- a/src/crypto.c
++++ b/src/crypto.c
+@@ -288,7 +288,15 @@ void calc_pmk( char *key, char *essid_pre, unsigned char pmk[40] )
+ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], unsigned char mic[20]) {
+ int i;
+ unsigned char pke[100];
++ #if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L
++ #define HMAC_USE_NO_PTR
++ #endif
++
++ #ifdef HMAC_USE_NO_PTR
+ HMAC_CTX ctx;
++ #else
++ HMAC_CTX * ctx;
++ #endif
+
+ memcpy( pke, "Pairwise key expansion", 23 );
+
+@@ -314,6 +322,7 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
+ memcpy( pke + 67, ap->wpa.snonce, 32 );
+ }
+
++ #ifdef HMAC_USE_NO_PTR
+ HMAC_CTX_init(&ctx);
+ HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL);
+ for(i = 0; i < 4; i++ )
+@@ -325,6 +334,20 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
+ HMAC_Final(&ctx, ptk + i*20, NULL);
+ }
+ HMAC_CTX_cleanup(&ctx);
++ #else
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL);
++ for(i = 0; i < 4; i++ )
++ {
++ pke[99] = i;
++ //HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL);
++ HMAC_Init_ex(ctx, 0, 0, 0, 0);
++ HMAC_Update(ctx, pke, 100);
++ HMAC_Final(ctx, ptk + i*20, NULL);
++ }
++ HMAC_CTX_free(ctx);
++ #endif
++ #undef HMAC_USE_NO_PTR
+
+ if( ap->wpa.keyver == 1 )
+ {