tests: auto_interworking=1
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d5b14d0027
commit
543f9f7ead
2 changed files with 31 additions and 1 deletions
|
@ -436,6 +436,32 @@ def test_ap_hs20_username(dev, apdev):
|
|||
ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
|
||||
scan_freq="2412")
|
||||
|
||||
def test_ap_hs20_auto_interworking(dev, apdev):
|
||||
"""Hotspot 2.0 connection with auto_interworking=1"""
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
|
||||
dev[0].hs20_enable(auto_interworking=True)
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
'username': "hs20-test",
|
||||
'password': "password",
|
||||
'ca_cert': "auth_serv/ca.pem",
|
||||
'domain': "example.com",
|
||||
'update_identifier': "1234" })
|
||||
dev[0].request("REASSOCIATE")
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=15)
|
||||
if ev is None:
|
||||
raise Exception("Connection timed out")
|
||||
check_sp_type(dev[0], "home")
|
||||
status = dev[0].get_status()
|
||||
if status['pairwise_cipher'] != "CCMP":
|
||||
raise Exception("Unexpected pairwise cipher")
|
||||
if status['hs20'] != "2":
|
||||
raise Exception("Unexpected HS 2.0 support indication")
|
||||
|
||||
def eap_test(dev, ap, eap_params, method, user):
|
||||
bssid = ap['bssid']
|
||||
params = hs20_ap_params()
|
||||
|
|
|
@ -178,9 +178,13 @@ class WpaSupplicant:
|
|||
networks.append(network)
|
||||
return networks
|
||||
|
||||
def hs20_enable(self):
|
||||
def hs20_enable(self, auto_interworking=False):
|
||||
self.request("SET interworking 1")
|
||||
self.request("SET hs20 1")
|
||||
if auto_interworking:
|
||||
self.request("SET auto_interworking 1")
|
||||
else:
|
||||
self.request("SET auto_interworking 0")
|
||||
|
||||
def add_cred(self):
|
||||
id = self.request("ADD_CRED")
|
||||
|
|
Loading…
Reference in a new issue