From: Jouni Malinen Date: Tue, 27 Nov 2018 14:50:36 +0000 (+0200) Subject: tests: DPP QR Code and keygen failure X-Git-Tag: hostap_2_7~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545bf954c43c12f2e9d0d338ca2f4e2ec317a15e;p=thirdparty%2Fhostap.git tests: DPP QR Code and keygen failure Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index 886545527..6bb63b969 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -173,6 +173,18 @@ def test_dpp_qr_code_unsupported_curve(dev, apdev): if "FAIL" not in id: raise Exception("Unsupported/invalid curve accepted") +def test_dpp_qr_code_keygen_fail(dev, apdev): + """DPP QR Code and keygen failure""" + check_dpp_capab(dev[0]) + + with alloc_fail(dev[0], 1, "dpp_bootstrap_key_der;dpp_keygen"): + if "FAIL" not in dev[0].request("DPP_BOOTSTRAP_GEN type=qrcode"): + raise Exception("Failure not reported") + + with alloc_fail(dev[0], 1, "base64_gen_encode;dpp_keygen"): + if "FAIL" not in dev[0].request("DPP_BOOTSTRAP_GEN type=qrcode"): + raise Exception("Failure not reported") + def test_dpp_qr_code_curve_select(dev, apdev): """DPP QR Code and curve selection""" check_dpp_capab(dev[0], brainpool=True)