From 800ae647dfbb5eeae8eae3c3a6592a178412cb95 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 9 Mar 2022 21:26:28 +0200 Subject: [PATCH] tests: Check DPP3 support in the build for netAccessKey curve changes These test cases need to be skipped if CONFIG_DPP3=y is not defined in the build. Signed-off-by: Jouni Malinen --- tests/hwsim/test_dpp.py | 5 +++-- tests/hwsim/test_sigma_dut.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index bfd803a66..b7f035077 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -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) diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index 52e10df81..601a39275 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -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"