esp_wifi: Fix open auth issue after commit message exchange

This commit is contained in:
Shyamal Khachane 2023-01-11 11:16:13 +05:30
parent 13eb2e8dae
commit 677c813137
2 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit 9b274f15ccd3e5b3075065ffdc26fa5ddcdcdd66
Subproject commit 35ff76e25c2b1f76b2c18bb8d0ee05a9f48cc03b

View File

@ -18,7 +18,7 @@ static struct wpabuf *g_sae_commit = NULL;
static struct wpabuf *g_sae_confirm = NULL;
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;
u32 len = 0;
@ -33,6 +33,7 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid)
if (wpa_sta_cur_pmksa_matches_akm()) {
wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead");
*sae_msg_len = 0;
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) {
return NULL;
}
if (ESP_OK != wpa3_build_sae_commit(bssid))
if (ESP_OK != wpa3_build_sae_commit(bssid, sae_msg_len))
return NULL;
*sae_msg_len = wpabuf_len(g_sae_commit);
buf = wpabuf_mhead_u8(g_sae_commit);