sae_password_id=None, sae_and_psk=False, pmksa_caching=False,
roam_with_reassoc=False, also_non_ft=False, only_one_way=False,
wait_before_roam=0, return_after_initial=False, ieee80211w="1",
- sae_transition=False, beacon_prot=False, sae_ext_key=False):
+ sae_transition=False, beacon_prot=False, sae_ext_key=False,
+ check_ssid=False):
logger.info("Connect to first AP")
copts = {}
hapd0.wait_sta()
else:
hapd1.wait_sta()
+ if check_ssid and dev[0].get_status_field("ssid_verified") == "1":
+ raise Exception("Unexpected ssid_verified=1 in STATUS")
dev.request("DISCONNECT")
dev.wait_disconnected()
dev.request("RECONNECT")
return
if dev.get_status_field('bssid') != ap2['bssid']:
raise Exception("Did not connect to correct AP")
+ if check_ssid and dev.get_status_field("ssid_verified") != "1":
+ raise Exception("ssid_verified=1 not in STATUS")
+
if (i == 0 or i == roams - 1) and test_connectivity:
hapd2ap.wait_sta()
dev.dump_monitor()
dev.roam(ap1['bssid'])
if dev.get_status_field('bssid') != ap1['bssid']:
raise Exception("Did not connect to correct AP")
+ if check_ssid and dev.get_status_field("ssid_verified") != "1":
+ raise Exception("ssid_verified=1 not in STATUS")
if (i == 0 or i == roams - 1) and test_connectivity:
hapd1ap.wait_sta()
dev.dump_monitor()
raise Exception("Unexpected number of RxKHs (AP1b)")
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, eap=True)
+
+def test_ap_ft_ssid_verified(dev, apdev):
+ """WPA2-PSK-FT and ssid_verified=1 indication"""
+ hapd0, hapd1 = start_ft(apdev)
+ run_roams(dev[0], apdev, hapd0, hapd1, "test-ft", "12345678",
+ check_ssid=True)
if pmksa is None:
raise Exception("No PMKSA cache entry created")
+ if dev[0].get_status_field("ssid_verified") == "1":
+ raise Exception("Unexpected ssid_verified=1 in STATUS")
+
dev[0].request("DISCONNECT")
dev[0].wait_disconnected()
hapd.wait_sta_disconnect()
if "CTRL-EVENT-EAP-STARTED" in ev:
raise Exception("Unexpected EAP exchange")
hapd.wait_sta()
+ if dev[0].get_status_field("ssid_verified") != "1":
+ raise Exception("ssid_verified=1 not in STATUS")
hwsim_utils.test_connectivity(dev[0], hapd)
pmksa2 = dev[0].get_pmksa(bssid)
if pmksa2 is None:
dev[0].connect("test-sae", sae_password="secret",
sae_password_id="pw id",
key_mgmt="SAE", scan_freq="2412")
+ if dev[0].get_status_field("ssid_verified") == "1":
+ raise Exception("Unexpected ssid_verified=1 in STATUS")
finally:
dev[0].set("sae_pwe", "0")
dev[0].set("sae_groups", "")
dev[0].set("sae_pwe", "0")
-def check_sae_pwe_group(dev, group, sae_pwe):
+def check_sae_pwe_group(dev, group, sae_pwe, check_ssid=False):
dev.set("sae_groups", str(group))
dev.set("sae_pwe", str(sae_pwe))
dev.connect("sae-pwe", psk="12345678", key_mgmt="SAE", scan_freq="2412")
+ if check_ssid and dev.get_status_field("ssid_verified") != "1":
+ raise Exception("ssid_verified=1 not in STATUS")
dev.request("REMOVE_NETWORK all")
dev.wait_disconnected()
dev.dump_monitor()
check_sae_capab(dev[0])
start_sae_pwe_ap(apdev[0], 19, 1)
try:
- check_sae_pwe_group(dev[0], 19, 1)
- check_sae_pwe_group(dev[0], 19, 2)
+ check_sae_pwe_group(dev[0], 19, 1, check_ssid=True)
+ check_sae_pwe_group(dev[0], 19, 2, check_ssid=True)
finally:
dev[0].set("sae_groups", "")
dev[0].set("sae_pwe", "0")
raise Exception("SSID protection event not seen")
dev[0].wait_connected()
hapd.wait_sta()
+
+ if dev[0].get_status_field("ssid_verified") != "1":
+ raise Exception("ssid_verified=1 not in STATUS")