aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-07-03 17:45:37 (GMT)
committerJouni Malinen <j@w1.fi>2016-07-03 19:37:01 (GMT)
commit43e337f70c41d63a10460a4ff6d06087ce00e7d1 (patch)
treebea2976190836d80a4b9b08777b84f7d854ded2c
parentd717c10233a699ce55e5125558bdd2e6c446fca5 (diff)
downloadhostap-43e337f70c41d63a10460a4ff6d06087ce00e7d1.zip
hostap-43e337f70c41d63a10460a4ff6d06087ce00e7d1.tar.gz
hostap-43e337f70c41d63a10460a4ff6d06087ce00e7d1.tar.bz2
tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_ap_hs20.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index 021148a..5259e88 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -1342,6 +1342,27 @@ def test_ap_hs20_req_roaming_consortium(dev, apdev):
if "FAIL" not in dev[0].request('SET_CRED {} required_roaming_consortium {}'.format(id, val)):
raise Exception("Invalid roaming consortium value accepted: " + val)
+def test_ap_hs20_req_roaming_consortium_no_match(dev, apdev):
+ """Hotspot 2.0 required roaming consortium and no match"""
+ check_eap_capa(dev[0], "MSCHAPV2")
+ params = hs20_ap_params()
+ del params['roaming_consortium']
+ hostapd.add_ap(apdev[0], params)
+
+ params = hs20_ap_params()
+ params['ssid'] = "test-hs20-other"
+ params['roaming_consortium'] = [ "223345" ]
+ hostapd.add_ap(apdev[1], params)
+
+ values = default_cred()
+ values['required_roaming_consortium'] = "223344"
+ dev[0].hs20_enable()
+ id = dev[0].add_cred_values(values)
+ dev[0].request("INTERWORKING_SELECT auto freq=2412")
+ ev = dev[0].wait_event(["INTERWORKING-NO-MATCH"], timeout=10)
+ if ev is None:
+ raise Exception("INTERWORKING-NO-MATCH not reported")
+
def test_ap_hs20_excluded_ssid(dev, apdev):
"""Hotspot 2.0 exclusion based on SSID"""
check_eap_capa(dev[0], "MSCHAPV2")