aircrack-ng: rebuild against openssl 1.1.1
This commit is contained in:
parent
b6b8f4a05b
commit
96482ccfdc
@ -1,7 +1,7 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.aircrack-ng.org
|
||||
TERMUX_PKG_DESCRIPTION="an 802.11 WEP and WPA-PSK keys cracking program"
|
||||
TERMUX_PKG_VERSION=1.2-rc4
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://download.aircrack-ng.org/aircrack-ng-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=d93ac16aade5b4d37ab8cdf6ce4b855835096ccf83deb65ffdeff6d666eaff36
|
||||
TERMUX_PKG_MAINTAINER="Auxilus @Auxilus"
|
||||
|
57
root-packages/aircrack-ng/openssl-1.1.0.patch
Normal file
57
root-packages/aircrack-ng/openssl-1.1.0.patch
Normal file
@ -0,0 +1,57 @@
|
||||
commit 9a1846507ff043c397257206ff21adae90a122f4
|
||||
Author: Thomas d'Otreppe <tdotreppe@aircrack-ng.org>
|
||||
Date: Wed Dec 21 00:18:46 2016 +0000
|
||||
|
||||
Fixed compilation with OpenSSL 1.1.0 (Closes: #1711).
|
||||
|
||||
git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab
|
||||
|
||||
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 )
|
||||
{
|
Loading…
Reference in New Issue
Block a user