From 0e67d81fb6abb5bedfefe70c323b5972ea1585c0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 3 Jul 2016 19:53:03 +0300 Subject: [PATCH] tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_hs20.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 8c5b2550e..2667c2c32 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -463,6 +463,22 @@ def test_ap_hs20_sim(dev, apdev): if ev is None: raise Exception("Timeout on already-connected event") +def test_ap_hs20_sim_invalid(dev, apdev): + """Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI""" + hlr_auc_gw_available() + bssid = apdev[0]['bssid'] + params = hs20_ap_params() + params['hessid'] = bssid + params['anqp_3gpp_cell_net'] = "555,444" + params['domain_name'] = "wlan.mnc444.mcc555.3gppnetwork.org" + hostapd.add_ap(apdev[0], params) + + dev[0].hs20_enable() + dev[0].add_cred_values({ 'imsi': "555444-3332221110", 'eap': "SIM", + 'milenage': "5122250214c33e723a5dd523fc145fc0:981d464c7c52eb6e5036234984ad0bcf:000000000123"}) + # This hits "No valid IMSI available" in build_root_nai() + interworking_select(dev[0], bssid, freq="2412") + def test_ap_hs20_aka(dev, apdev): """Hotspot 2.0 with simulated USIM and EAP-AKA""" hlr_auc_gw_available()