tests: OWE DH groups

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-10-08 16:38:44 +03:00 committed by Jouni Malinen
parent ec9f483774
commit 8acde197c2
2 changed files with 20 additions and 1 deletions

View file

@ -33,6 +33,25 @@ def test_owe(dev, apdev):
if val != "OWE": if val != "OWE":
raise Exception("Unexpected key_mgmt: " + val) raise Exception("Unexpected key_mgmt: " + val)
def test_owe_groups(dev, apdev):
"""Opportunistic Wireless Encryption - DH groups"""
if "OWE" not in dev[0].get_capability("key_mgmt"):
raise HwsimSkip("OWE not supported")
params = { "ssid": "owe",
"wpa": "2",
"wpa_key_mgmt": "OWE",
"rsn_pairwise": "CCMP" }
hapd = hostapd.add_ap(apdev[0], params)
bssid = hapd.own_addr()
dev[0].scan_for_bss(bssid, freq="2412")
for group in [ 19, 20, 21 ]:
dev[0].connect("owe", key_mgmt="OWE", owe_group=str(group))
hwsim_utils.test_connectivity(dev[0], hapd)
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
dev[0].dump_monitor()
def test_owe_and_psk(dev, apdev): def test_owe_and_psk(dev, apdev):
"""Opportunistic Wireless Encryption and WPA2-PSK enabled""" """Opportunistic Wireless Encryption and WPA2-PSK enabled"""
if "OWE" not in dev[0].get_capability("key_mgmt"): if "OWE" not in dev[0].get_capability("key_mgmt"):

View file

@ -1028,7 +1028,7 @@ class WpaSupplicant:
"engine", "fils_dh_group", "bssid_hint", "engine", "fils_dh_group", "bssid_hint",
"dpp_csign", "dpp_csign_expiry", "dpp_csign", "dpp_csign_expiry",
"dpp_netaccesskey", "dpp_netaccesskey_expiry", "dpp_netaccesskey", "dpp_netaccesskey_expiry",
"group_mgmt" ] "group_mgmt", "owe_group" ]
for field in not_quoted: for field in not_quoted:
if field in kwargs and kwargs[field]: if field in kwargs and kwargs[field]:
self.set_network(id, field, kwargs[field]) self.set_network(id, field, kwargs[field])