]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: EAP-pwd local error case in eap_pwd_perform_confirm_exchange()
authorJouni Malinen <j@w1.fi>
Tue, 16 Oct 2018 09:13:31 +0000 (12:13 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 16 Oct 2018 09:22:58 +0000 (12:22 +0300)
This is a regression test case for a memory leak on these error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_eap_proto.py

index 88ac039cb7b239cb03e5bd14eb9b65186d8286be..46703f7c204c151f1d8f2f846b41046221aa922f 100644 (file)
@@ -6513,6 +6513,20 @@ def test_eap_proto_pwd_errors(dev, apdev):
         dev[0].request("REMOVE_NETWORK all")
         dev[0].wait_disconnected()
 
+    for i in range(1, 5):
+        with fail_test(dev[0], i,
+                       "=crypto_ec_point_to_bin;eap_pwd_perform_confirm_exchange"):
+            dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
+                           eap="PWD", identity="pwd-hash",
+                           password_hex="hash:e3718ece8ab74792cbbfffd316d2d19a",
+                           wait_connect=False)
+            ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"], timeout=10)
+            if ev is None:
+                raise Exception("No EAP-Failure reported")
+            dev[0].request("REMOVE_NETWORK all")
+            dev[0].wait_disconnected()
+            dev[0].dump_monitor()
+
 def test_eap_proto_erp(dev, apdev):
     """ERP protocol tests"""
     check_erp_capa(dev[0])