aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-10-04 14:03:47 (GMT)
committerJouni Malinen <j@w1.fi>2019-10-04 14:03:47 (GMT)
commit656b07c189d8a59d63e49b7d784cf0229098cf34 (patch)
treeb51e9e255b59e9b9393fa8565456483fba500b21
parent1743ddce769bb7525c45b18d683a4eb6971f508f (diff)
downloadhostap-656b07c189d8a59d63e49b7d784cf0229098cf34.zip
hostap-656b07c189d8a59d63e49b7d784cf0229098cf34.tar.gz
hostap-656b07c189d8a59d63e49b7d784cf0229098cf34.tar.bz2
tests: sigma_dut DPP/QR responder status query
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_sigma_dut.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py
index 707b28b..f30caf8 100644
--- a/tests/hwsim/test_sigma_dut.py
+++ b/tests/hwsim/test_sigma_dut.py
@@ -1225,8 +1225,20 @@ def test_sigma_dut_dpp_qr_resp_chan_list(dev, apdev):
run_sigma_dut_dpp_qr_resp(dev, apdev, 1, chan_list='81/2 81/6 81/1',
listen_chan=2)
+def test_sigma_dut_dpp_qr_resp_status_query(dev, apdev):
+ """sigma_dut DPP/QR responder status query"""
+ params = hostapd.wpa2_params(ssid="DPPNET01",
+ passphrase="ThisIsDppPassphrase")
+ hapd = hostapd.add_ap(apdev[0], params)
+
+ try:
+ dev[1].set("dpp_config_processing", "2")
+ run_sigma_dut_dpp_qr_resp(dev, apdev, 3, status_query=True)
+ finally:
+ dev[1].set("dpp_config_processing", "0")
+
def run_sigma_dut_dpp_qr_resp(dev, apdev, conf_idx, chan_list=None,
- listen_chan=None):
+ listen_chan=None, status_query=False):
check_dpp_capab(dev[0])
check_dpp_capab(dev[1])
sigma = start_sigma_dut(dev[0].ifname)
@@ -1248,10 +1260,14 @@ def run_sigma_dut_dpp_qr_resp(dev, apdev, conf_idx, chan_list=None,
cmd = "dev_exec_action,program,DPP,DPPActionType,AutomaticDPP,DPPAuthRole,Responder,DPPConfIndex,%d,DPPAuthDirection,Single,DPPProvisioningRole,Configurator,DPPConfEnrolleeRole,STA,DPPSigningKeyECC,P-256,DPPBS,QR,DPPTimeout,6" % conf_idx
if listen_chan:
cmd += ",DPPListenChannel," + str(listen_chan)
+ if status_query:
+ cmd += ",DPPStatusQuery,Yes"
res = sigma_dut_cmd(cmd, timeout=10)
t.join()
if "BootstrapResult,OK,AuthResult,OK,ConfResult,OK" not in res:
raise Exception("Unexpected result: " + res)
+ if status_query and "StatusResult,0" not in res:
+ raise Exception("Status query did not succeed: " + res)
finally:
stop_sigma_dut(sigma)