From 0e664e0c12c44a0e9e4886f1235aa7d6b54f05cd Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 21 Nov 2017 01:02:37 +0200 Subject: [PATCH] tests: sigma_dut DPP/QR initiator as Configurator or Enrollee Signed-off-by: Jouni Malinen --- tests/hwsim/test_sigma_dut.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index bf1b10867..a39aea603 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -1258,7 +1258,12 @@ def test_sigma_dut_dpp_qr_init_configurator_4(dev, apdev): """sigma_dut DPP/QR initiator as Configurator (conf index 4)""" run_sigma_dut_dpp_qr_init_configurator(dev, apdev, 4) -def run_sigma_dut_dpp_qr_init_configurator(dev, apdev, conf_idx): +def test_sigma_dut_dpp_qr_init_configurator_both(dev, apdev): + """sigma_dut DPP/QR initiator as Configurator or Enrollee (conf index 1)""" + run_sigma_dut_dpp_qr_init_configurator(dev, apdev, 1, "Both") + +def run_sigma_dut_dpp_qr_init_configurator(dev, apdev, conf_idx, + prov_role="Configurator"): check_dpp_capab(dev[0]) check_dpp_capab(dev[1]) sigma = start_sigma_dut(dev[0].ifname) @@ -1279,7 +1284,7 @@ def run_sigma_dut_dpp_qr_init_configurator(dev, apdev, conf_idx): if "status,COMPLETE" not in res: raise Exception("dev_exec_action did not succeed: " + res) - res = sigma_dut_cmd("dev_exec_action,program,DPP,DPPActionType,AutomaticDPP,DPPAuthRole,Initiator,DPPAuthDirection,Single,DPPProvisioningRole,Configurator,DPPConfIndex,%d,DPPSigningKeyECC,P-256,DPPConfEnrolleeRole,STA,DPPBS,QR,DPPTimeout,6" % conf_idx) + res = sigma_dut_cmd("dev_exec_action,program,DPP,DPPActionType,AutomaticDPP,DPPAuthRole,Initiator,DPPAuthDirection,Single,DPPProvisioningRole,%s,DPPConfIndex,%d,DPPSigningKeyECC,P-256,DPPConfEnrolleeRole,STA,DPPBS,QR,DPPTimeout,6" % (prov_role, conf_idx)) if "BootstrapResult,OK,AuthResult,OK,ConfResult,OK" not in res: raise Exception("Unexpected result: " + res) finally: