From: Jouni Malinen Date: Fri, 21 Sep 2018 18:39:34 +0000 (+0300) Subject: tests: DPP_CONFIGURATOR_ADD error path X-Git-Tag: hostap_2_7~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1e2d3816625abcc8ec81c9783a853d5072e4ed1;p=thirdparty%2Fhostap.git tests: DPP_CONFIGURATOR_ADD error path 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 --- diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index 61b38576a..18262ebe0 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -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")