]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Check DPP3 support in the build for netAccessKey curve changes
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 9 Mar 2022 19:26:28 +0000 (21:26 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 9 Mar 2022 19:26:28 +0000 (21:26 +0200)
These test cases need to be skipped if CONFIG_DPP3=y is not defined in
the build.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_dpp.py
tests/hwsim/test_sigma_dut.py

index bfd803a66afc235d8da55b3a3251ee5190839a1b..b7f035077daf424c344ae80f7a0923b0f806be2d 100644 (file)
@@ -376,10 +376,11 @@ def run_dpp_qr_code_auth_unicast(dev, apdev, curve, netrole=None, key=None,
                                  configurator=False, conf_curve=None,
                                  net_access_key_curve=None,
                                  conf=None, qr=None, stop_responder=True):
+    min_ver = 3 if net_access_key_curve else 1
     brainpool = (curve and "brainpool" in curve) or \
         (conf_curve and "brainpool" in conf_curve)
-    check_dpp_capab(dev[0], brainpool)
-    check_dpp_capab(dev[1], brainpool)
+    check_dpp_capab(dev[0], brainpool, min_ver=min_ver)
+    check_dpp_capab(dev[1], brainpool, min_ver=min_ver)
     if configurator:
         conf_id = dev[1].dpp_configurator_add(curve=conf_curve,
                                               net_access_key_curve=net_access_key_curve)
index 52e10df81753fcebab91077c5981cfcf5c4d2152..601a392759beab9efe50cc2e7353cb9027c7c142 100644 (file)
@@ -1552,8 +1552,9 @@ def run_sigma_dut_dpp_qr_resp(dev, apdev, conf_idx, chan_list=None,
                               listen_chan=None, status_query=False,
                               enrollee_role="STA", cert_path=None,
                               net_access_key_curve=None):
-    check_dpp_capab(dev[0])
-    check_dpp_capab(dev[1])
+    min_ver = 3 if net_access_key_curve else 1
+    check_dpp_capab(dev[0], min_ver=min_ver)
+    check_dpp_capab(dev[1], min_ver=min_ver)
     sigma = start_sigma_dut(dev[0].ifname, cert_path=cert_path)
     try:
         cmd = "dev_exec_action,program,DPP,DPPActionType,GetLocalBootstrap,DPPCryptoIdentifier,P-256,DPPBS,QR"