wok-next diff aircrack-ng/stuff/patches/9a1846507ff043c397257206ff21adae90a122f4.patch @ rev 20616
xrdp: up 0.9.3.1; zopfli: fix build; gcc61: attempt to fix; add gcc6 (latest among 6.x.x).
gcc61 and gcc6 are broken now.
gcc61 and gcc6 are broken now.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Apr 21 05:15:11 2018 +0300 (2018-04-21) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/aircrack-ng/stuff/patches/9a1846507ff043c397257206ff21adae90a122f4.patch Sat Apr 21 05:15:11 2018 +0300 1.3 @@ -0,0 +1,59 @@ 1.4 +From 9a1846507ff043c397257206ff21adae90a122f4 Mon Sep 17 00:00:00 2001 1.5 +From: Thomas d'Otreppe <tdotreppe@aircrack-ng.org> 1.6 +Date: Wed, 21 Dec 2016 00:18:46 +0000 1.7 +Subject: [PATCH] Fixed compilation with OpenSSL 1.1.0 (Closes: #1711). 1.8 + 1.9 +git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab 1.10 +--- 1.11 + src/crypto.c | 23 +++++++++++++++++++++++ 1.12 + 1 file changed, 23 insertions(+) 1.13 + 1.14 +diff --git a/src/crypto.c b/src/crypto.c 1.15 +index c331875..46fa9c5 100644 1.16 +--- a/src/crypto.c 1.17 ++++ b/src/crypto.c 1.18 +@@ -288,7 +288,15 @@ void calc_pmk( char *key, char *essid_pre, unsigned char pmk[40] ) 1.19 + void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], unsigned char mic[20]) { 1.20 + int i; 1.21 + unsigned char pke[100]; 1.22 ++ #if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L 1.23 ++ #define HMAC_USE_NO_PTR 1.24 ++ #endif 1.25 ++ 1.26 ++ #ifdef HMAC_USE_NO_PTR 1.27 + HMAC_CTX ctx; 1.28 ++ #else 1.29 ++ HMAC_CTX * ctx; 1.30 ++ #endif 1.31 + 1.32 + memcpy( pke, "Pairwise key expansion", 23 ); 1.33 + 1.34 +@@ -314,6 +322,7 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], 1.35 + memcpy( pke + 67, ap->wpa.snonce, 32 ); 1.36 + } 1.37 + 1.38 ++ #ifdef HMAC_USE_NO_PTR 1.39 + HMAC_CTX_init(&ctx); 1.40 + HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL); 1.41 + for(i = 0; i < 4; i++ ) 1.42 +@@ -325,6 +334,20 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], 1.43 + HMAC_Final(&ctx, ptk + i*20, NULL); 1.44 + } 1.45 + HMAC_CTX_cleanup(&ctx); 1.46 ++ #else 1.47 ++ ctx = HMAC_CTX_new(); 1.48 ++ HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL); 1.49 ++ for(i = 0; i < 4; i++ ) 1.50 ++ { 1.51 ++ pke[99] = i; 1.52 ++ //HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL); 1.53 ++ HMAC_Init_ex(ctx, 0, 0, 0, 0); 1.54 ++ HMAC_Update(ctx, pke, 100); 1.55 ++ HMAC_Final(ctx, ptk + i*20, NULL); 1.56 ++ } 1.57 ++ HMAC_CTX_free(ctx); 1.58 ++ #endif 1.59 ++ #undef HMAC_USE_NO_PTR 1.60 + 1.61 + if( ap->wpa.keyver == 1 ) 1.62 + {