tests: HS 2.0 session information URL

Verify that session information is stored from Access-Accept and sent to
the station at the requested timeout. Verify that station processes this
notification.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-03-10 11:34:31 +02:00 committed by Jouni Malinen
parent 4056b0c747
commit 8fc1f204df
2 changed files with 30 additions and 0 deletions

View file

@ -62,3 +62,7 @@ radius_accept_attr=26:x:00009f680405016400
"hs20-subrem-test" TTLS-MSCHAPV2 "password" [2] "hs20-subrem-test" TTLS-MSCHAPV2 "password" [2]
radius_accept_attr=26:x:00009f6801170168747470733a2f2f6578616d706c652e636f6d2f radius_accept_attr=26:x:00009f6801170168747470733a2f2f6578616d706c652e636f6d2f
"hs20-session-info-test" TTLS-MSCHAPV2 "password" [2]
radius_accept_attr=27:d:63
radius_accept_attr=26:x:00009f6805170168747470733a2f2f6578616d706c652e636f6d2f

View file

@ -1521,6 +1521,32 @@ def test_ap_hs20_remediation_required(dev, apdev):
if " 1 https://example.com/" not in ev: if " 1 https://example.com/" not in ev:
raise Exception("Unexpected subscription remediation event contents") raise Exception("Unexpected subscription remediation event contents")
def test_ap_hs20_session_info(dev, apdev):
"""Hotspot 2.0 connection and session information from RADIUS"""
bssid = apdev[0]['bssid']
params = hs20_ap_params()
params['nai_realm'] = [ "0,example.com,21[2:4]" ]
hostapd.add_ap(apdev[0]['ifname'], params)
dev[0].request("SET pmf 1")
dev[0].hs20_enable()
dev[0].add_cred_values({ 'realm': "example.com",
'username': "hs20-session-info-test",
'password': "password" })
interworking_select(dev[0], bssid, freq="2412")
interworking_connect(dev[0], bssid, "TTLS")
ev = dev[0].wait_event(["ESS-DISASSOC-IMMINENT"], timeout=10)
if ev is None:
raise Exception("Timeout on ESS disassociation imminent notice")
if " 1 59904 https://example.com/" not in ev:
raise Exception("Unexpected ESS disassociation imminent event contents")
ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"])
if ev is None:
raise Exception("Scan not started")
ev = dev[0].wait_event(["CTRL-EVENT-SCAN-RESULTS"])
if ev is None:
raise Exception("Scan not completed")
def test_ap_hs20_osen(dev, apdev): def test_ap_hs20_osen(dev, apdev):
"""Hotspot 2.0 OSEN connection""" """Hotspot 2.0 OSEN connection"""
params = { 'ssid': "osen", params = { 'ssid': "osen",