mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: wpa_supplicant secure mesh using sae_password
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d5906fbb72
commit
f75ed521a5
@ -304,12 +304,15 @@ def _test_mesh_open_rssi_threshold(dev, apdev, value, expected):
|
||||
raise Exception("mesh_rssi_threshold should be " + str(expected) +
|
||||
": " + str(mesh_rssi_threshold))
|
||||
|
||||
def add_mesh_secure_net(dev, psk=True, pmf=False, pairwise=None, group=None):
|
||||
def add_mesh_secure_net(dev, psk=True, pmf=False, pairwise=None, group=None,
|
||||
sae_password=False):
|
||||
id = dev.add_network()
|
||||
dev.set_network(id, "mode", "5")
|
||||
dev.set_network_quoted(id, "ssid", "wpas-mesh-sec")
|
||||
dev.set_network(id, "key_mgmt", "SAE")
|
||||
dev.set_network(id, "frequency", "2412")
|
||||
if sae_password:
|
||||
dev.set_network_quoted(id, "sae_password", "thisismypassphrase!")
|
||||
if psk:
|
||||
dev.set_network_quoted(id, "psk", "thisismypassphrase!")
|
||||
if pmf:
|
||||
@ -349,6 +352,25 @@ def test_wpas_mesh_secure(dev, apdev):
|
||||
if state != "COMPLETED":
|
||||
raise Exception("Unexpected wpa_state on dev1: " + state)
|
||||
|
||||
def test_wpas_mesh_secure_sae_password(dev, apdev):
|
||||
"""wpa_supplicant secure mesh using sae_password"""
|
||||
check_mesh_support(dev[0], secure=True)
|
||||
dev[0].request("SET sae_groups ")
|
||||
id = add_mesh_secure_net(dev[0], psk=False, sae_password=True)
|
||||
dev[0].mesh_group_add(id)
|
||||
|
||||
dev[1].request("SET sae_groups ")
|
||||
id = add_mesh_secure_net(dev[1])
|
||||
dev[1].mesh_group_add(id)
|
||||
|
||||
check_mesh_group_added(dev[0])
|
||||
check_mesh_group_added(dev[1])
|
||||
|
||||
check_mesh_peer_connected(dev[0])
|
||||
check_mesh_peer_connected(dev[1])
|
||||
|
||||
hwsim_utils.test_connectivity(dev[0], dev[1])
|
||||
|
||||
def test_mesh_secure_pmf(dev, apdev):
|
||||
"""Secure mesh network connectivity with PMF enabled"""
|
||||
check_mesh_support(dev[0], secure=True)
|
||||
|
Loading…
Reference in New Issue
Block a user