]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: DPP QR Code and keygen failure
authorJouni Malinen <jouni@codeaurora.org>
Tue, 27 Nov 2018 14:50:36 +0000 (16:50 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 27 Nov 2018 14:50:36 +0000 (16:50 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 8865455271af8c3dcd2d775aaee4bbffa22a50d8..6bb63b969495078aa5a2562608f5699894d5e43c 100644 (file)
@@ -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)