aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-01-10 15:09:50 (GMT)
committerJouni Malinen <jouni@codeaurora.org>2018-01-11 22:50:45 (GMT)
commitc5238c483f757a6f42f2ed9ed22dbbe9e29dc193 (patch)
treebe91fb59044b9afbf781f750b45a91865d3ab822
parent23c45cd0ffdf2195e0f20cf0457e16efdc86eeb2 (diff)
downloadhostap-c5238c483f757a6f42f2ed9ed22dbbe9e29dc193.zip
hostap-c5238c483f757a6f42f2ed9ed22dbbe9e29dc193.tar.gz
hostap-c5238c483f757a6f42f2ed9ed22dbbe9e29dc193.tar.bz2
tests: sigma_dut with alternative OWE transition mode configuration
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_sigma_dut.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py
index df8d650..cece77b 100644
--- a/tests/hwsim/test_sigma_dut.py
+++ b/tests/hwsim/test_sigma_dut.py
@@ -850,6 +850,37 @@ def test_sigma_dut_ap_owe_transition_mode(dev, apdev, params):
finally:
stop_sigma_dut(sigma)
+def test_sigma_dut_ap_owe_transition_mode_2(dev, apdev, params):
+ """sigma_dut controlled AP with OWE and transition mode (2)"""
+ if "OWE" not in dev[0].get_capability("key_mgmt"):
+ raise HwsimSkip("OWE not supported")
+ logdir = os.path.join(params['logdir'],
+ "sigma_dut_ap_owe_transition_mode_2.sigma-hostapd")
+ with HWSimRadio() as (radio, iface):
+ sigma = start_sigma_dut(iface, hostapd_logdir=logdir)
+ try:
+ sigma_dut_cmd_check("ap_reset_default,NAME,AP,Program,WPA3")
+ sigma_dut_cmd_check("ap_set_wireless,NAME,AP,WLAN_TAG,1,CHANNEL,1,SSID,owe,MODE,11ng")
+ sigma_dut_cmd_check("ap_set_security,NAME,AP,WLAN_TAG,1,KEYMGNT,NONE")
+ sigma_dut_cmd_check("ap_set_wireless,NAME,AP,WLAN_TAG,2,CHANNEL,1,MODE,11ng")
+ sigma_dut_cmd_check("ap_set_security,NAME,AP,WLAN_TAG,2,KEYMGNT,OWE")
+ sigma_dut_cmd_check("ap_config_commit,NAME,AP")
+
+ res1 = sigma_dut_cmd_check("ap_get_mac_address,NAME,AP,WLAN_TAG,1,Interface,24G")
+ res2 = sigma_dut_cmd_check("ap_get_mac_address,NAME,AP,WLAN_TAG,2,Interface,24G")
+
+ dev[0].connect("owe", key_mgmt="OWE", ieee80211w="2",
+ scan_freq="2412")
+ dev[1].connect("owe", key_mgmt="NONE", scan_freq="2412")
+ if dev[0].get_status_field('bssid') not in res2:
+ raise Exception("Unexpected ap_get_mac_address WLAN_TAG,2: " + res1)
+ if dev[1].get_status_field('bssid') not in res1:
+ raise Exception("Unexpected ap_get_mac_address WLAN_TAG,1: " + res2)
+
+ sigma_dut_cmd_check("ap_reset_default")
+ finally:
+ stop_sigma_dut(sigma)
+
def dpp_init_enrollee(dev, id1):
logger.info("Starting DPP initiator/enrollee in a thread")
time.sleep(1)