Android Wi-Fi Wi-Fi联盟PMK Caching认证简介

本文介绍了一种利用PMK缓存进行无线设备漫游的测试过程,包括连接到接入点、离开覆盖范围再返回等步骤,并强调了在特定步骤中使用PMKID的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Test Procedure and Expected Results


5.2.16 PMK Caching is for roaming, test steps as below : 
1. connect to AP1(association req + full EAP authentication + 4-way handshake). 

2. roam to AP2(association req + full EAP authentication + 4-way handshake). 

3. roam back to AP1(re-association req with PMKID + 4-way handshake). 


If you are testing 5.2.16, we must include the PMKID in steps 3, so the full EAP authentication is no need. 


But according your sniffer, test steps as below : 

1. connect to AP. 

2. out of the AP range. 

3. come back to the AP range and reconnect the AP. 

diff --git a/wpa_supplicant-2.9_standard/wpa_supplicant/events.c b/wpa_supplicant-2.9_standard/wpa_supplicant/events.c index a075284..4351d8a 100644 --- a/wpa_supplicant-2.9_standard/wpa_supplicant/events.c +++ b/wpa_supplicant-2.9_standard/wpa_supplicant/events.c @@ -4057,13 +4057,29 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpa_s, WLAN_REASON_DEAUTH_LEAVING); return; } -#ifdef CONFIG_MLD_PATCH - if (wpa_drv_get_mlo_info(wpa_s) < 0) { - wpa_dbg(wpa_s, MSG_ERROR, "Failed to get MLO connection info"); - wpa_supplicant_deauthenticate(wpa_s, - WLAN_REASON_DEAUTH_LEAVING); - return; - } + +#ifdef CONFIG_SAE +#ifdef CONFIG_DRIVER_NL80211_SPRD + /* process SAE PMK & PMKID */ + if (wpa_key_mgmt_sae(wpa_s->key_mgmt) && + wpa_s->sme.sae_pmksa_caching == 0) { + const u8 *pmk = wpa_get_vendor_ie(data->assoc_info.resp_ies, + data->assoc_info.resp_ies_len, SPRD_SAE_CNN_RES); + if (!pmk) { + wpa_dbg(wpa_s, MSG_ERROR, "SPRD SAE fatal error: no PMK found"); + wpa_supplicant_deauthenticate( + wpa_s, WLAN_REASON_DEAUTH_LEAVING); + return; + } + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-1:", pmk, 2 + 4 + PMK_LEN + PMKID_LEN); + pmk += 6; /* skip vendor IE header: 1 id + 1 len + 4 OUI */ + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-2:", pmk, PMK_LEN); + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-3:", pmk + PMK_LEN, PMKID_LEN); + wpa_printf(MSG_INFO, "SPRD SAE completed - SET PMK for 4-way handshake"); + /* 32 bytes PMK + 16 bytes PMKID from CP2 SAE auth */ + wpa_sm_set_pmk(wpa_s->wpa, pmk, PMK_LEN, pmk + PMK_LEN, bssid); + } +#endif #endif if (data && wpa_supplicant_event_associnfo(wpa_s, data) < 0) return;
最新发布
07-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值