tests: Verify excluded_ssid with all credential types
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0b651713bf
commit
e2afdef223
2 changed files with 22 additions and 1 deletions
|
@ -818,11 +818,14 @@ def test_ap_hs20_req_roaming_consortium(dev, apdev):
|
|||
def test_ap_hs20_excluded_ssid(dev, apdev):
|
||||
"""Hotspot 2.0 exclusion based on SSID"""
|
||||
params = hs20_ap_params()
|
||||
params['roaming_consortium'] = [ "223344" ]
|
||||
params['anqp_3gpp_cell_net'] = "555,444"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['roaming_consortium'] = [ "223344" ]
|
||||
params['anqp_3gpp_cell_net'] = "555,444"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
|
||||
values = default_cred()
|
||||
|
@ -837,6 +840,24 @@ def test_ap_hs20_excluded_ssid(dev, apdev):
|
|||
if len(ev) != 1:
|
||||
raise Exception("Excluded network not reported")
|
||||
|
||||
values = default_cred()
|
||||
values['roaming_consortium'] = "223344"
|
||||
values['eap'] = "TTLS"
|
||||
values['phase2'] = "auth=MSCHAPV2"
|
||||
values['excluded_ssid'] = "test-hs20"
|
||||
events = policy_test(dev[0], apdev[1], values)
|
||||
ev = [e for e in events if "INTERWORKING-BLACKLISTED " + apdev[0]['bssid'] in e]
|
||||
if len(ev) != 1:
|
||||
raise Exception("Excluded network not reported")
|
||||
|
||||
values = { 'imsi': "555444-333222111", 'eap': "SIM",
|
||||
'milenage': "5122250214c33e723a5dd523fc145fc0:981d464c7c52eb6e5036234984ad0bcf:000000000123",
|
||||
'excluded_ssid': "test-hs20" }
|
||||
events = policy_test(dev[0], apdev[1], values)
|
||||
ev = [e for e in events if "INTERWORKING-BLACKLISTED " + apdev[0]['bssid'] in e]
|
||||
if len(ev) != 1:
|
||||
raise Exception("Excluded network not reported")
|
||||
|
||||
def test_ap_hs20_roam_to_higher_prio(dev, apdev):
|
||||
"""Hotspot 2.0 and roaming from current to higher priority network"""
|
||||
bssid = apdev[0]['bssid']
|
||||
|
|
|
@ -210,7 +210,7 @@ class WpaSupplicant:
|
|||
quoted = [ "realm", "username", "password", "domain", "imsi",
|
||||
"excluded_ssid", "milenage", "ca_cert", "client_cert",
|
||||
"private_key", "domain_suffix_match", "provisioning_sp",
|
||||
"roaming_partner" ]
|
||||
"roaming_partner", "phase1", "phase2" ]
|
||||
for field in quoted:
|
||||
if field in params:
|
||||
self.set_cred_quoted(id, field, params[field])
|
||||
|
|
Loading…
Reference in a new issue