]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify Interworking network selection based on roaming consortium
authorJouni Malinen <j@w1.fi>
Thu, 26 Dec 2013 11:18:46 +0000 (13:18 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Dec 2013 14:55:45 +0000 (16:55 +0200)
In addition, use PEAP as the EAP method to increase testing coverage.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/test_ap_hs20.py
tests/hwsim/wpasupplicant.py

index f8630a301f23017de3c9f248a972ffd375821d19..ed5c730c5856734c1873fa44c310fa20547a203f 100644 (file)
@@ -361,6 +361,25 @@ def test_ap_hs20_username(dev, apdev):
     interworking_connect(dev[0], bssid, "TTLS")
     check_sp_type(dev[0], "home")
 
+def test_ap_hs20_roaming_consortium(dev, apdev):
+    """Hotspot 2.0 connection based on roaming consortium match"""
+    bssid = apdev[0]['bssid']
+    params = hs20_ap_params()
+    params['hessid'] = bssid
+    hostapd.add_ap(apdev[0]['ifname'], params)
+
+    dev[0].request("SET ignore_old_scan_res 1")
+    dev[0].hs20_enable()
+    id = dev[0].add_cred_values({ 'realm': "example.com",
+                                  'username': "user",
+                                  'password': "password",
+                                  'domain': "example.com",
+                                  'roaming_consortium': "fedcba",
+                                  'eap': "PEAP" })
+    interworking_select(dev[0], bssid, "home")
+    interworking_connect(dev[0], bssid, "PEAP")
+    check_sp_type(dev[0], "home")
+
 def test_ap_hs20_username_roaming(dev, apdev):
     """Hotspot 2.0 connection in username/password credential (roaming)"""
     bssid = apdev[0]['bssid']
index eae6cf06dffadbb6da99436ea8c4b5e8fe59ea01..c39663df242111e78724a63ea24b7c8f4573f6db 100644 (file)
@@ -175,7 +175,8 @@ class WpaSupplicant:
             if field in params:
                 self.set_cred_quoted(id, field, params[field])
 
-        not_quoted = [ "eap", "required_roaming_consortium" ]
+        not_quoted = [ "eap", "roaming_consortium",
+                       "required_roaming_consortium" ]
         for field in not_quoted:
             if field in params:
                 self.set_cred(id, field, params[field])