From fa617ee6a0b2d39e6372c93ef9437caa3bd9065a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 9 Apr 2018 13:09:49 +0300 Subject: [PATCH] tests: SAE and PSK enabled in wpa_supplicant network profile Signed-off-by: Jouni Malinen --- tests/hwsim/test_sae.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index a8a6d0ddb..922e78dd0 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -251,6 +251,29 @@ def test_sae_mixed(dev, apdev): dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE", scan_freq="2412") +def test_sae_and_psk(dev, apdev): + """SAE and PSK enabled in network profile""" + if "SAE" not in dev[0].get_capability("auth_alg"): + raise HwsimSkip("SAE not supported") + params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678") + params['wpa_key_mgmt'] = 'SAE' + hostapd.add_ap(apdev[0], params) + + dev[0].request("SET sae_groups ") + dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE WPA-PSK", + scan_freq="2412") + +def test_sae_and_psk2(dev, apdev): + """SAE and PSK enabled in network profile (use PSK)""" + if "SAE" not in dev[0].get_capability("auth_alg"): + raise HwsimSkip("SAE not supported") + params = hostapd.wpa2_params(ssid="test-psk", passphrase="12345678") + hostapd.add_ap(apdev[0], params) + + dev[0].request("SET sae_groups ") + dev[0].connect("test-psk", psk="12345678", key_mgmt="SAE WPA-PSK", + scan_freq="2412") + def test_sae_mixed_mfp(dev, apdev): """Mixed SAE and non-SAE network and MFP required with SAE""" if "SAE" not in dev[0].get_capability("auth_alg"):