]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: DPP_CONFIGURATOR_ADD error path
authorJouni Malinen <jouni@codeaurora.org>
Fri, 21 Sep 2018 18:39:34 +0000 (21:39 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 21 Sep 2018 18:39:34 +0000 (21:39 +0300)
This is a regression test case for a memory leak on DPP_CONFIGURATOR_ADD
error path in dpp_keygen_configurator() when an unsupported curve is
specified.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 61b38576aaa4838ba5f067cdffbec5a967643b10..18262ebe088645bcbf998e61e8c1ee2a5d49f0c7 100644 (file)
@@ -4423,3 +4423,9 @@ def test_dpp_pkex_test_fail(dev, apdev):
             if ev:
                 dev[0].request("DPP_STOP_LISTEN")
                 dev[0].wait_event(["GAS-QUERY-DONE"], timeout=3)
+
+def test_dpp_keygen_configurator_error(dev, apdev):
+    """DPP Configurator keygen error case"""
+    check_dpp_capab(dev[0])
+    if "FAIL" not in dev[0].request("DPP_CONFIGURATOR_ADD curve=unknown"):
+        raise Exception("Unexpected success of invalid DPP_CONFIGURATOR_ADD")