aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-09-01 22:32:56 (GMT)
committerJouni Malinen <j@w1.fi>2017-09-04 10:32:03 (GMT)
commit1342c47a3329f3d2dbca57c1948ef50df0cdbc7b (patch)
tree90fe5306117e583e251669b88b2fa0227ed57d41 /tests
parente75335384a29987bf856bdf0a70af1c1b2a606eb (diff)
downloadhostap-1342c47a3329f3d2dbca57c1948ef50df0cdbc7b.zip
hostap-1342c47a3329f3d2dbca57c1948ef50df0cdbc7b.tar.gz
hostap-1342c47a3329f3d2dbca57c1948ef50df0cdbc7b.tar.bz2
tests: SAE reflection attack using internal hostapd mechanism
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_sae.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py
index c7d3169..7b225fb 100644
--- a/tests/hwsim/test_sae.py
+++ b/tests/hwsim/test_sae.py
@@ -716,6 +716,34 @@ def test_sae_reflection_attack_ffc(dev, apdev):
"""SAE reflection attack (FFC)"""
sae_reflection_attack(apdev[0], dev[0], 5)
+def sae_reflection_attack_internal(apdev, dev, group):
+ if "SAE" not in dev.get_capability("auth_alg"):
+ raise HwsimSkip("SAE not supported")
+ params = hostapd.wpa2_params(ssid="test-sae",
+ passphrase="no-knowledge-of-passphrase")
+ params['wpa_key_mgmt'] = 'SAE'
+ params['sae_reflection_attack'] = '1'
+ hapd = hostapd.add_ap(apdev, params)
+ bssid = apdev['bssid']
+
+ dev.scan_for_bss(bssid, freq=2412)
+ dev.request("SET sae_groups %d" % group)
+ dev.connect("test-sae", psk="reflection-attack", key_mgmt="SAE",
+ scan_freq="2412", wait_connect=False)
+ ev = dev.wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
+ if ev is not None:
+ raise Exception("Unexpected connection")
+
+@remote_compatible
+def test_sae_reflection_attack_ecc_internal(dev, apdev):
+ """SAE reflection attack (ECC) - internal"""
+ sae_reflection_attack_internal(apdev[0], dev[0], 19)
+
+@remote_compatible
+def test_sae_reflection_attack_ffc_internal(dev, apdev):
+ """SAE reflection attack (FFC) - internal"""
+ sae_reflection_attack_internal(apdev[0], dev[0], 5)
+
@remote_compatible
def test_sae_anti_clogging_proto(dev, apdev):
"""SAE anti clogging protocol testing"""