aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-01-29 12:24:47 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-29 12:32:17 (GMT)
commit086d3cc2dcafd6a2ca57afa750186170b9b16ee9 (patch)
treeefc7cf94021114edae9231b73c9126e6d55d45bf /tests
parent20032ba6824e2e47cb73f820a03c7a27335be9f9 (diff)
downloadhostap-086d3cc2dcafd6a2ca57afa750186170b9b16ee9.zip
hostap-086d3cc2dcafd6a2ca57afa750186170b9b16ee9.tar.gz
hostap-086d3cc2dcafd6a2ca57afa750186170b9b16ee9.tar.bz2
tests: FILS SK using ERP and roam to another SSID
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_fils.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/hwsim/test_fils.py b/tests/hwsim/test_fils.py
index 870b131..93e2c49 100644
--- a/tests/hwsim/test_fils.py
+++ b/tests/hwsim/test_fils.py
@@ -217,6 +217,62 @@ def run_fils_sk_erp(dev, apdev, key_mgmt):
raise Exception("Association failed")
hwsim_utils.test_connectivity(dev[0], hapd)
+def test_fils_sk_erp_another_ssid(dev, apdev):
+ """FILS SK using ERP and roam to another SSID"""
+ check_fils_capa(dev[0])
+ check_erp_capa(dev[0])
+
+ start_erp_as(apdev[1])
+
+ bssid = apdev[0]['bssid']
+ params = hostapd.wpa2_eap_params(ssid="fils")
+ params['wpa_key_mgmt'] = "FILS-SHA256"
+ params['auth_server_port'] = "18128"
+ params['erp_domain'] = 'example.com'
+ params['fils_realm'] = 'example.com'
+ params['disable_pmksa_caching'] = '1'
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ dev[0].scan_for_bss(bssid, freq=2412)
+ dev[0].request("ERP_FLUSH")
+ id = dev[0].connect("fils", key_mgmt="FILS-SHA256",
+ eap="PSK", identity="psk.user@example.com",
+ password_hex="0123456789abcdef0123456789abcdef",
+ erp="1", scan_freq="2412")
+
+ dev[0].request("DISCONNECT")
+ dev[0].wait_disconnected()
+ hapd.disable()
+ dev[0].flush_scan_cache()
+ if "FAIL" in dev[0].request("PMKSA_FLUSH"):
+ raise Exception("PMKSA_FLUSH failed")
+
+ params = hostapd.wpa2_eap_params(ssid="fils2")
+ params['wpa_key_mgmt'] = "FILS-SHA256"
+ params['auth_server_port'] = "18128"
+ params['erp_domain'] = 'example.com'
+ params['fils_realm'] = 'example.com'
+ params['disable_pmksa_caching'] = '1'
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ dev[0].scan_for_bss(bssid, freq=2412)
+ dev[0].dump_monitor()
+ id = dev[0].connect("fils2", key_mgmt="FILS-SHA256",
+ eap="PSK", identity="psk.user@example.com",
+ password_hex="0123456789abcdef0123456789abcdef",
+ erp="1", scan_freq="2412", wait_connect=False)
+
+ ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED",
+ "EVENT-ASSOC-REJECT",
+ "CTRL-EVENT-CONNECTED"], timeout=10)
+ if ev is None:
+ raise Exception("Connection using FILS/ERP timed out")
+ if "CTRL-EVENT-EAP-STARTED" in ev:
+ raise Exception("Unexpected EAP exchange")
+ if "EVENT-ASSOC-REJECT" in ev:
+ raise Exception("Association failed")
+ hwsim_utils.test_connectivity(dev[0], hapd)
+
def test_fils_sk_multiple_realms(dev, apdev):
"""FILS SK and multiple realms"""
check_fils_capa(dev[0])