]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: EAP-TTLS with TLS session ticket enabled
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 31 Mar 2015 16:40:41 +0000 (19:40 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 1 Apr 2015 09:57:11 +0000 (12:57 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_eap.py
tests/hwsim/wpasupplicant.py

index dd4255c0a7d767d988e6f24ada0c250a8dcd39cc..a75f8fa4657330d256f3406e61cd8821fab81671 100644 (file)
@@ -2840,3 +2840,29 @@ def _test_ap_wpa2_eap_in_bridge(dev, apdev):
     wpas.wait_disconnected()
     wpas.request("RECONNECT")
     wpas.wait_connected()
+
+def test_ap_wpa2_eap_session_ticket(dev, apdev):
+    """WPA2-Enterprise connection using EAP-TTLS and TLS session ticket enabled"""
+    params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    key_mgmt = hapd.get_config()['key_mgmt']
+    if key_mgmt.split(' ')[0] != "WPA-EAP":
+        raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
+    eap_connect(dev[0], apdev[0], "TTLS", "pap user",
+                anonymous_identity="ttls", password="password",
+                ca_cert="auth_serv/ca.pem",
+                phase1="tls_disable_session_ticket=0", phase2="auth=PAP")
+    eap_reauth(dev[0], "TTLS")
+
+def test_ap_wpa2_eap_no_workaround(dev, apdev):
+    """WPA2-Enterprise connection using EAP-TTLS and eap_workaround=0"""
+    params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    key_mgmt = hapd.get_config()['key_mgmt']
+    if key_mgmt.split(' ')[0] != "WPA-EAP":
+        raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
+    eap_connect(dev[0], apdev[0], "TTLS", "pap user",
+                anonymous_identity="ttls", password="password",
+                ca_cert="auth_serv/ca.pem", eap_workaround='0',
+                phase2="auth=PAP")
+    eap_reauth(dev[0], "TTLS")
index 034dbadee40f690104292f48f96ee7478d492823..45a813fb26a6ce3819654db4cc2031ef8109e69e 100644 (file)
@@ -838,7 +838,7 @@ class WpaSupplicant:
                        "disable_ht40", "disable_sgi", "disable_ldpc",
                        "ht40_intolerant", "update_identifier", "mac_addr",
                        "erp", "bg_scan_period", "bssid_blacklist",
-                       "bssid_whitelist", "mem_only_psk" ]
+                       "bssid_whitelist", "mem_only_psk", "eap_workaround" ]
         for field in not_quoted:
             if field in kwargs and kwargs[field]:
                 self.set_network(id, field, kwargs[field])