tests: MBO and WPA2 without PMF on misbehaving AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-09-21 00:34:51 +03:00 committed by Jouni Malinen
parent 2e06cef80a
commit d0d303ae91

View file

@ -540,6 +540,22 @@ def test_mbo_without_pmf(dev, apdev):
else:
raise
def test_mbo_without_pmf_workaround(dev, apdev):
"""MBO and WPA2 without PMF on misbehaving AP"""
ssid = "test-wnm-mbo"
params = {'ssid': ssid, "wpa": '2',
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
"wpa_passphrase": "12345678",
"vendor_elements": "dd07506f9a16010100"}
hapd = hostapd.add_ap(apdev[0], params)
dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK",
proto="WPA2", ieee80211w="1", scan_freq="2412")
hapd.wait_sta()
sta = hapd.get_sta(dev[0].own_addr())
ext_capab = bytearray(binascii.unhexlify(sta['ext_capab']))
if ext_capab[2] & 0x08:
raise Exception("STA did not disable BSS Transition capability")
def check_mbo_anqp(dev, bssid, cell_data_conn_pref):
if "OK" not in dev.request("ANQP_GET " + bssid + " 272,mbo:2"):
raise Exception("ANQP_GET command failed")