OWE: Add testing RSNE for OWE assoc response with driver SME/MLME
Allow RSNE to be overwritten for testing purposes also in the driver-based SME/MLME case. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
aca4d84e3d
commit
a22e235fd0
2 changed files with 22 additions and 0 deletions
|
@ -2992,6 +2992,15 @@ u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
const u8 *owe_dh, u8 owe_dh_len,
|
||||
u8 *owe_buf, size_t owe_buf_len, u16 *reason)
|
||||
{
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (hapd->conf->own_ie_override) {
|
||||
wpa_printf(MSG_DEBUG, "OWE: Using IE override");
|
||||
*reason = WLAN_STATUS_SUCCESS;
|
||||
return wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
||||
owe_buf_len, NULL, 0);
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
if (wpa_auth_sta_get_pmksa(sta->wpa_sm)) {
|
||||
wpa_printf(MSG_DEBUG, "OWE: Using PMKSA caching");
|
||||
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
||||
|
|
|
@ -1037,6 +1037,19 @@ u8 * wpa_auth_write_assoc_resp_owe(struct wpa_state_machine *sm,
|
|||
const u8 *req_ies, size_t req_ies_len)
|
||||
{
|
||||
int res;
|
||||
struct wpa_auth_config *conf = &sm->wpa_auth->conf;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (conf->own_ie_override_len) {
|
||||
if (max_len < conf->own_ie_override_len)
|
||||
return 0;
|
||||
wpa_hexdump(MSG_DEBUG, "WPA: Forced own IE(s) for testing",
|
||||
conf->own_ie_override, conf->own_ie_override_len);
|
||||
os_memcpy(pos, conf->own_ie_override,
|
||||
conf->own_ie_override_len);
|
||||
return pos + conf->own_ie_override_len;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
res = wpa_write_rsn_ie(&sm->wpa_auth->conf, pos, max_len,
|
||||
sm->pmksa ? sm->pmksa->pmkid : NULL);
|
||||
|
|
Loading…
Reference in a new issue