esp_wifi: Fix open auth issue after commit message exchange

pull/10716/head
Shyamal Khachane 2023-01-05 14:18:40 +05:30
rodzic aa8a00c4f0
commit ce6bcb3868
2 zmienionych plików z 4 dodań i 3 usunięć

@ -1 +1 @@
Subproject commit 4357a7bf06fe1da91bf067891a3c7ef2e9c4298f Subproject commit 22878be3b2f9e518c517df3f827323aa5a04e354

Wyświetl plik

@ -18,7 +18,7 @@ static struct wpabuf *g_sae_commit = NULL;
static struct wpabuf *g_sae_confirm = NULL; static struct wpabuf *g_sae_confirm = NULL;
int g_allowed_groups[] = { IANA_SECP256R1, 0 }; int g_allowed_groups[] = { IANA_SECP256R1, 0 };
static esp_err_t wpa3_build_sae_commit(u8 *bssid) static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len)
{ {
int default_group = IANA_SECP256R1; int default_group = IANA_SECP256R1;
u32 len = 0; u32 len = 0;
@ -33,6 +33,7 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid)
if (wpa_sta_cur_pmksa_matches_akm()) { if (wpa_sta_cur_pmksa_matches_akm()) {
wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead"); wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead");
*sae_msg_len = 0;
return ESP_FAIL; return ESP_FAIL;
} }
@ -151,7 +152,7 @@ static u8 *wpa3_build_sae_msg(u8 *bssid, u32 sae_msg_type, size_t *sae_msg_len)
if (esp_wifi_get_wps_status_internal() != WPS_STATUS_DISABLE) { if (esp_wifi_get_wps_status_internal() != WPS_STATUS_DISABLE) {
return NULL; return NULL;
} }
if (ESP_OK != wpa3_build_sae_commit(bssid)) if (ESP_OK != wpa3_build_sae_commit(bssid, sae_msg_len))
return NULL; return NULL;
*sae_msg_len = wpabuf_len(g_sae_commit); *sae_msg_len = wpabuf_len(g_sae_commit);
buf = wpabuf_mhead_u8(g_sae_commit); buf = wpabuf_mhead_u8(g_sae_commit);