aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2018-04-13 09:03:40 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-13 09:09:33 (GMT)
commitf75ed521a5b998519be5efee7ad9dae718887e12 (patch)
treeb71898340e1f8e92ddadd4ea8269a4b3b1c4ac96
parentd5906fbb723b0c854945a3421f9b681c402d74f8 (diff)
downloadhostap-f75ed521a5b998519be5efee7ad9dae718887e12.zip
hostap-f75ed521a5b998519be5efee7ad9dae718887e12.tar.gz
hostap-f75ed521a5b998519be5efee7ad9dae718887e12.tar.bz2
tests: wpa_supplicant secure mesh using sae_password
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_wpas_mesh.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index c3cfb7b..7d9e0ef 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -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)