aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-07-08 13:18:04 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-08 13:21:38 (GMT)
commitc1361765fd2b57d8cb330c5566b060f5b6b26c2c (patch)
tree5a20bf7546012e217e1ec4b53c670bdaabcfd115 /tests
parent1f2ae8cff5dba42fd6514485315043a6684ea049 (diff)
downloadhostap-c1361765fd2b57d8cb330c5566b060f5b6b26c2c.zip
hostap-c1361765fd2b57d8cb330c5566b060f5b6b26c2c.tar.gz
hostap-c1361765fd2b57d8cb330c5566b060f5b6b26c2c.tar.bz2
tests: Additional EAP-TTLS error path
This is a regression test for a memory leak on an error path. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_eap_proto.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py
index 0ca9c9c..d97a6f1 100644
--- a/tests/hwsim/test_eap_proto.py
+++ b/tests/hwsim/test_eap_proto.py
@@ -6951,6 +6951,23 @@ def test_eap_proto_ttls_errors(dev, apdev):
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
+ tests = [ (1, "nt_challenge_response;eap_ttls_phase2_request_mschap") ]
+ for count, func in tests:
+ with fail_test(dev[0], count, func):
+ dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
+ eap="TTLS", anonymous_identity="ttls",
+ identity="mschap user", password="password",
+ ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAP",
+ erp="1", wait_connect=False)
+ ev = dev[0].wait_event(["CTRL-EVENT-EAP-PROPOSED-METHOD"],
+ timeout=15)
+ if ev is None:
+ raise Exception("Timeout on EAP start")
+ wait_fail_trigger(dev[0], "GET_FAIL",
+ note="Test failure not triggered for: %d:%s" % (count, func))
+ dev[0].request("REMOVE_NETWORK all")
+ dev[0].wait_disconnected()
+
def test_eap_proto_expanded(dev, apdev):
"""EAP protocol tests with expanded header"""
global eap_proto_expanded_test_done