aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Braun <michael-dev@fami-braun.de>2016-09-24 20:53:43 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-09 09:01:34 (GMT)
commitd0175d6e482ad343c93e508356557aa073598032 (patch)
treec9c830159c64fa5eda7a07b0c83bda2f11668800 /tests
parent96590564d658cf344778e9c84bcd58d39764e11d (diff)
downloadhostap-d0175d6e482ad343c93e508356557aa073598032.zip
hostap-d0175d6e482ad343c93e508356557aa073598032.tar.gz
hostap-d0175d6e482ad343c93e508356557aa073598032.tar.bz2
test: FT with locally generated PMK-R0/PMK-R1 from PSK
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_ft.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py
index bd9b1ab..a2b7380 100644
--- a/tests/hwsim/test_ap_ft.py
+++ b/tests/hwsim/test_ap_ft.py
@@ -46,19 +46,27 @@ def ft_params(rsn=True, ssid=None, passphrase=None):
params["reassociation_deadline"] = "1000"
return params
-def ft_params1(rsn=True, ssid=None, passphrase=None):
+def ft_params1a(rsn=True, ssid=None, passphrase=None):
params = ft_params(rsn, ssid, passphrase)
params['nas_identifier'] = "nas1.w1.fi"
params['r1_key_holder'] = "000102030405"
+ return params
+
+def ft_params1(rsn=True, ssid=None, passphrase=None):
+ params = ft_params1a(rsn, ssid, passphrase)
params['r0kh'] = [ "02:00:00:00:03:00 nas1.w1.fi 100102030405060708090a0b0c0d0e0f",
"02:00:00:00:04:00 nas2.w1.fi 300102030405060708090a0b0c0d0e0f" ]
params['r1kh'] = "02:00:00:00:04:00 00:01:02:03:04:06 200102030405060708090a0b0c0d0e0f"
return params
-def ft_params2(rsn=True, ssid=None, passphrase=None):
+def ft_params2a(rsn=True, ssid=None, passphrase=None):
params = ft_params(rsn, ssid, passphrase)
params['nas_identifier'] = "nas2.w1.fi"
params['r1_key_holder'] = "000102030406"
+ return params
+
+def ft_params2(rsn=True, ssid=None, passphrase=None):
+ params = ft_params2a(rsn, ssid, passphrase)
params['r0kh'] = [ "02:00:00:00:03:00 nas1.w1.fi 200102030405060708090a0b0c0d0e0f",
"02:00:00:00:04:00 nas2.w1.fi 000102030405060708090a0b0c0d0e0f" ]
params['r1kh'] = "02:00:00:00:03:00 00:01:02:03:04:05 300102030405060708090a0b0c0d0e0f"
@@ -162,6 +170,22 @@ def test_ap_ft(dev, apdev):
if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"):
raise Exception("Scan results missing RSN element info")
+def test_ap_ft_local_key_gen(dev, apdev):
+ """WPA2-PSK-FT AP with local key generation (without pull/push)"""
+ ssid = "test-ft"
+ passphrase="12345678"
+
+ params = ft_params1a(ssid=ssid, passphrase=passphrase)
+ params['ft_psk_generate_local'] = "1";
+ hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
+ params = ft_params2a(ssid=ssid, passphrase=passphrase)
+ params['ft_psk_generate_local'] = "1";
+ hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
+
+ run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase)
+ if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"):
+ raise Exception("Scan results missing RSN element info")
+
def test_ap_ft_many(dev, apdev):
"""WPA2-PSK-FT AP multiple times"""
ssid = "test-ft"