aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-12-08 11:41:50 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-08 12:06:58 (GMT)
commit842c29c173f3a80ac74e0fa3e57a134e9d301f06 (patch)
tree436ed8a2a734699c9da2ba01b338d868e90d75c8 /tests
parentf44d760cf0717af1fc4b3cf73b385ffbbe5fb4b5 (diff)
downloadhostap-842c29c173f3a80ac74e0fa3e57a134e9d301f06.zip
hostap-842c29c173f3a80ac74e0fa3e57a134e9d301f06.tar.gz
hostap-842c29c173f3a80ac74e0fa3e57a134e9d301f06.tar.bz2
tests: Hotspot 2.0 connection attempt without PMF
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_hs20.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index 6fb2ef5..b33dc4b 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -6236,3 +6236,27 @@ def run_ap_hs20_release_number(dev, apdev, release):
rel = dev[0].get_status_field('hs20')
if rel != str(release):
raise Exception("Unexpected release number indicated: " + rel)
+
+def test_ap_hs20_missing_pmf(dev, apdev):
+ """Hotspot 2.0 connection attempt without PMF"""
+ check_eap_capa(dev[0], "MSCHAPV2")
+ bssid = apdev[0]['bssid']
+ params = hs20_ap_params()
+ params['hessid'] = bssid
+ params['disable_dgaf'] = '1'
+ hostapd.add_ap(apdev[0], params)
+
+ dev[0].hs20_enable()
+ dev[0].connect("test-hs20", proto="RSN", key_mgmt="WPA-EAP", eap="TTLS",
+ ieee80211w="0",
+ identity="hs20-test", password="password",
+ ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
+ scan_freq="2412", update_identifier="54321",
+ roaming_consortium_selection="1020304050",
+ wait_connect=False)
+ ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10)
+ dev[0].request("DISCONNECT")
+ if ev is None:
+ raise Exception("Association rejection not reported")
+ if "status_code=31" not in ev:
+ raise Exception("Unexpected rejection reason: " + ev)