]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: EAP-FAST/MSCHAPv2 and server OOM
authorJouni Malinen <j@w1.fi>
Tue, 30 Jun 2015 18:36:12 +0000 (21:36 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 30 Jun 2015 18:36:12 +0000 (21:36 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_eap.py

index 4197f95944d8c72c884f62d21486e16b5f988407..2eebdace24f3d76a4fecbc1745ba2fc0e4af9acd 100644 (file)
@@ -2367,6 +2367,32 @@ def test_ap_wpa2_eap_fast_prf_oom(dev, apdev):
             raise Exception("EAP failure not reported")
     dev[0].request("DISCONNECT")
 
+def test_ap_wpa2_eap_fast_server_oom(dev, apdev):
+    """EAP-FAST/MSCHAPv2 and server OOM"""
+    check_eap_capa(dev[0], "FAST")
+
+    params = int_eap_server_params()
+    params['dh_file'] = 'auth_serv/dh.conf'
+    params['pac_opaque_encr_key'] = '000102030405060708090a0b0c0d0e0f'
+    params['eap_fast_a_id'] = '1011'
+    params['eap_fast_a_id_info'] = 'another test server'
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+    with alloc_fail(hapd, 1, "tls_session_ticket_ext_cb"):
+        id = eap_connect(dev[0], apdev[0], "FAST", "user",
+                         anonymous_identity="FAST", password="password",
+                         ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
+                         phase1="fast_provisioning=1",
+                         pac_file="blob://fast_pac",
+                         expect_failure=True)
+        ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"], timeout=10)
+        if ev is None:
+            raise Exception("No EAP failure reported")
+        dev[0].wait_disconnected()
+        dev[0].request("DISCONNECT")
+
+    dev[0].select_network(id, freq="2412")
+
 def test_ap_wpa2_eap_tls_ocsp(dev, apdev):
     """WPA2-Enterprise connection using EAP-TLS and verifying OCSP"""
     params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")