aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-09-09 22:33:37 (GMT)
committerJouni Malinen <j@w1.fi>2017-09-09 22:39:37 (GMT)
commitc25aada9ec1fdea24f32db179a5a19f1e321180e (patch)
tree41fca459fd4fc4d9282778bf547c30e65d30180a /tests
parent446600c35449455f04de50380cdd56a3f0b47a77 (diff)
downloadhostap-c25aada9ec1fdea24f32db179a5a19f1e321180e.zip
hostap-c25aada9ec1fdea24f32db179a5a19f1e321180e.tar.gz
hostap-c25aada9ec1fdea24f32db179a5a19f1e321180e.tar.bz2
tests: EAP-AKA' with external UMTS auth to hit Synchronization-Failure
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_eap.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py
index 0a62fea..eb5b093 100644
--- a/tests/hwsim/test_ap_eap.py
+++ b/tests/hwsim/test_ap_eap.py
@@ -1185,6 +1185,40 @@ def _test_ap_wpa2_eap_aka_prime_ext_auth_fail(dev, apdev):
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
+def test_ap_wpa2_eap_aka_prime_ext(dev, apdev):
+ """EAP-AKA' with external UMTS auth to hit Synchronization-Failure"""
+ try:
+ _test_ap_wpa2_eap_aka_prime_ext(dev, apdev)
+ finally:
+ dev[0].request("SET external_sim 0")
+
+def _test_ap_wpa2_eap_aka_prime_ext(dev, apdev):
+ check_hlr_auc_gw_support()
+ params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
+ hostapd.add_ap(apdev[0], params)
+ dev[0].request("SET external_sim 1")
+ id = dev[0].connect("test-wpa2-eap", eap="AKA'", key_mgmt="WPA-EAP",
+ identity="6555444333222111",
+ password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123",
+ wait_connect=False, scan_freq="2412")
+ ev = dev[0].wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=15)
+ if ev is None:
+ raise Exception("Network connected timed out")
+
+ ev = dev[0].wait_event(["CTRL-REQ-SIM"], timeout=15)
+ if ev is None:
+ raise Exception("Wait for external SIM processing request timed out")
+ p = ev.split(':', 2)
+ if p[1] != "UMTS-AUTH":
+ raise Exception("Unexpected CTRL-REQ-SIM type")
+ rid = p[0].split('-')[3]
+ # This will fail during UMTS auth validation
+ if "OK" not in dev[0].request("CTRL-RSP-SIM-" + rid + ":UMTS-AUTS:112233445566778899aabbccddee"):
+ raise Exception("CTRL-RSP-SIM failed")
+ ev = dev[0].wait_event(["CTRL-REQ-SIM"], timeout=15)
+ if ev is None:
+ raise Exception("Wait for external SIM processing request timed out")
+
def test_ap_wpa2_eap_ttls_pap(dev, apdev):
"""WPA2-Enterprise connection using EAP-TTLS/PAP"""
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")