View | Details | Raw Unified | Return to bug 232140
Collapse All | Expand All

(-)net-mgmt/kismet/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	kismet
4
PORTNAME=	kismet
5
DISTVERSION=	2016-07-R1
5
DISTVERSION=	2016-07-R1
6
PORTREVISION=	1
6
PORTREVISION=	2
7
PORTEPOCH=	1
7
PORTEPOCH=	1
8
CATEGORIES=	net-mgmt
8
CATEGORIES=	net-mgmt
9
MASTER_SITES=	http://www.kismetwireless.net/code/
9
MASTER_SITES=	http://www.kismetwireless.net/code/
(-)net-mgmt/kismet/files/patch-restricted-plugin-ptw_aircrack-crypto.cc (-9 / +65 lines)
Lines 1-10 Link Here
1
--- restricted-plugin-ptw/aircrack-crypto.cc.orig	2016-07-02 18:06:10 UTC
1
--- restricted-plugin-ptw/aircrack-crypto.cc.orig	2018-10-10 00:29:38 UTC
2
+++ restricted-plugin-ptw/aircrack-crypto.cc
2
+++ restricted-plugin-ptw/aircrack-crypto.cc
3
@@ -21,6 +21,7 @@
3
@@ -232,7 +232,7 @@ void calc_pmk( char *key, char *essid_pre, uchar pmk[4
4
 #include <string.h>
4
 // void calc_ptk (struct WPA_hdsk *wpa, unsigned char bssid[6], unsigned char pmk[32], unsigned char ptk[80]) {
5
 #include <arpa/inet.h>
5
 // 	int i;
6
 #include <assert.h>
6
 // 	uchar pke[100];
7
+#include <stdint.h>
7
-// 	HMAC_CTX ctx;
8
 #include "aircrack-crypto.h"
8
+// 	HMAC_CTX *ctx;
9
 #include "aircrack-crctable.h"
9
 //
10
 #include "aircrack-ptw2-lib.h"
10
 // 	memcpy( pke, "Pairwise key expansion", 23 );
11
 //
12
@@ -258,23 +258,23 @@ void calc_pmk( char *key, char *essid_pre, uchar pmk[4
13
 // 		memcpy( pke + 67, wpa->snonce, 32 );
14
 // 	}
15
 //
16
-// 	HMAC_CTX_init(&ctx);
17
-// 	HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL);
18
+// 	ctx = HMAC_CTX_new();
19
+// 	HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL);
20
 // 	for(i = 0; i < 4; i++ )
21
 // 	{
22
 // 		pke[99] = i;
23
 // 		//HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL);
24
-// 		HMAC_Init_ex(&ctx, 0, 0, 0, 0);
25
-// 		HMAC_Update(&ctx, pke, 100);
26
-// 		HMAC_Final(&ctx, ptk + i*20, NULL);
27
+// 		HMAC_Init_ex(ctx, 0, 0, 0, 0);
28
+// 		HMAC_Update(ctx, pke, 100);
29
+// 		HMAC_Final(ctx, ptk + i*20, NULL);
30
 // 	}
31
-// 	HMAC_CTX_cleanup(&ctx);
32
+// 	HMAC_CTX_free(ctx);
33
 // }
34
 
35
 void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], unsigned char mic[20]) {
36
 	int i;
37
 	uchar pke[100];
38
-	HMAC_CTX ctx;
39
+	HMAC_CTX *ctx;
40
 
41
 	memcpy( pke, "Pairwise key expansion", 23 );
42
 
43
@@ -300,17 +300,17 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[3
44
 		memcpy( pke + 67, ap->wpa.snonce, 32 );
45
 	}
46
 
47
-	HMAC_CTX_init(&ctx);
48
-	HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL);
49
+	ctx = HMAC_CTX_new();
50
+	HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL);
51
 	for(i = 0; i < 4; i++ )
52
 	{
53
 		pke[99] = i;
54
 		//HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL);
55
-		HMAC_Init_ex(&ctx, 0, 0, 0, 0);
56
-		HMAC_Update(&ctx, pke, 100);
57
-		HMAC_Final(&ctx, ptk + i*20, NULL);
58
+		HMAC_Init_ex(ctx, 0, 0, 0, 0);
59
+		HMAC_Update(ctx, pke, 100);
60
+		HMAC_Final(ctx, ptk + i*20, NULL);
61
 	}
62
-	HMAC_CTX_cleanup(&ctx);
63
+	HMAC_CTX_free(ctx);
64
 
65
 	if( ap->wpa.keyver == 1 )
66
 	{

Return to bug 232140