summarylogtreecommitdiffstats
path: root/0001_adj-wpe.patch
blob: 87ca5b86c819fc0cb2717d3ed24237c21eb4a160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--- a/hostapd-2.11-wpe.patch
+++ b/hostapd-2.11-wpe.patch
@@ -3399,8 +3399,8 @@
  		"User space daemon for IEEE 802.11 AP management,\n"
  		"IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n"
  		"Copyright (c) 2002-2024, Jouni Malinen <j@w1.fi> "
-- 		"and contributors\n",
-+ 		"and contributors\n"
+-		"and contributors\n",
++		"and contributors\n"
 +		"-----------------------------------------------------\n"
 +		"WPE (Wireless Pwnage Edition)\n"
 +		"This version has been cleverly modified to target\n"
@@ -3567,15 +3567,7 @@
 diff '--color=auto' -rupN hostapd-2.11/src/crypto/tls_openssl.c hostapd-2.11-wpe/src/crypto/tls_openssl.c
 --- hostapd-2.11/src/crypto/tls_openssl.c	2024-07-26 12:31:12.300000000 +0000
 +++ hostapd-2.11-wpe/src/crypto/tls_openssl.c	2024-07-26 12:33:34.152000000 +0000
-@@ -29,7 +29,6 @@
- #include <openssl/opensslv.h>
- #include <openssl/pkcs12.h>
- #include <openssl/x509v3.h>
--#include <openssl/rand.h>
- #if OPENSSL_VERSION_NUMBER >= 0x30000000L
- #include <openssl/core_names.h>
- #include <openssl/decoder.h>
-@@ -50,6 +49,7 @@
+@@ -49,6 +49,7 @@
  #include "sha256.h"
  #include "tls.h"
  #include "tls_openssl.h"
@@ -3583,7 +3575,7 @@
  
  #if !defined(CONFIG_FIPS) &&                             \
      (defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) ||   \
-@@ -205,6 +205,10 @@ static int tls_add_ca_from_keystore_enco
+@@ -204,6 +205,10 @@ static int tls_add_ca_from_keystore_enco
  
  #endif /* ANDROID */
  
@@ -3594,7 +3586,7 @@
  static int tls_openssl_ref_count = 0;
  static int tls_ex_idx_session = -1;
  
-@@ -1724,7 +1728,12 @@ struct tls_connection * tls_connection_i
+@@ -1723,7 +1728,12 @@ struct tls_connection * tls_connection_i
  
  	conn->context = context;
  	SSL_set_app_data(conn->ssl, conn);
@@ -3608,7 +3600,7 @@
  	SSL_set_msg_callback_arg(conn->ssl, conn);
  	options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 |
  		SSL_OP_SINGLE_DH_USE;
-@@ -4501,6 +4510,10 @@ openssl_handshake(struct tls_connection
+@@ -4500,6 +4510,10 @@ openssl_handshake(struct tls_connection
  	struct tls_context *context = conn->context;
  	int res;
  	struct wpabuf *out_data;
@@ -3619,7 +3611,7 @@
  
  	/*
  	 * Give TLS handshake data from the server (if available) to OpenSSL
-@@ -4619,6 +4632,30 @@ openssl_handshake(struct tls_connection
+@@ -4618,6 +4632,30 @@ openssl_handshake(struct tls_connection
  	}
  	wpabuf_put(out_data, res);
  
@@ -3650,7 +3642,7 @@
  	return out_data;
  }
  
-@@ -4751,6 +4788,13 @@ struct wpabuf * tls_connection_encrypt(v
+@@ -4750,6 +4788,13 @@ struct wpabuf * tls_connection_encrypt(v
  		tls_show_errors(MSG_INFO, __func__, "BIO_reset failed");
  		return NULL;
  	}
@@ -3664,7 +3656,7 @@
  	res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data));
  	if (res < 0) {
  		tls_show_errors(MSG_INFO, __func__,
-@@ -4758,6 +4802,12 @@ struct wpabuf * tls_connection_encrypt(v
+@@ -4757,6 +4802,12 @@ struct wpabuf * tls_connection_encrypt(v
  		return NULL;
  	}
  
@@ -3677,7 +3669,7 @@
  	/* Read encrypted data to be sent to the server */
  	buf = wpabuf_alloc(wpabuf_len(in_data) + 300);
  	if (buf == NULL)
-@@ -6028,3 +6078,69 @@ bool tls_connection_get_own_cert_used(st
+@@ -6027,3 +6078,68 @@ bool tls_connection_get_own_cert_used(st
  		return SSL_get_certificate(conn->ssl) != NULL;
  	return false;
  }