aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-11-14 18:56:43 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-14 18:56:43 (GMT)
commit9128f520c3bafa22d38ed775ea90ce0575ccc40f (patch)
treedebbe78a94ddf05040f7b1b574ce2116e480e0ff /tests
parente3a8ad44055d5b453c7f080958137eb718a60b6e (diff)
downloadhostap-9128f520c3bafa22d38ed775ea90ce0575ccc40f.zip
hostap-9128f520c3bafa22d38ed775ea90ce0575ccc40f.tar.gz
hostap-9128f520c3bafa22d38ed775ea90ce0575ccc40f.tar.bz2
tests: PMF required with SHA1-based AKM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_pmf.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py
index ad6272c..9fca624 100644
--- a/tests/hwsim/test_ap_pmf.py
+++ b/tests/hwsim/test_ap_pmf.py
@@ -280,3 +280,22 @@ def test_ap_pmf_required_eap(dev, apdev):
dev[0].connect("test-pmf-required-eap", key_mgmt="WPA-EAP-SHA256",
ieee80211w="2", eap="PSK", identity="psk.user@example.com",
password_hex="0123456789abcdef0123456789abcdef")
+
+def test_ap_pmf_required_sha1(dev, apdev):
+ """WPA2-PSK AP with PMF required with SHA1 AKM"""
+ ssid = "test-pmf-required-sha1"
+ wt = Wlantest()
+ wt.flush()
+ wt.add_passphrase("12345678")
+ params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
+ params["wpa_key_mgmt"] = "WPA-PSK";
+ params["ieee80211w"] = "2";
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+ key_mgmt = hapd.get_config()['key_mgmt']
+ if key_mgmt.split(' ')[0] != "WPA-PSK":
+ raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
+ dev[0].connect(ssid, psk="12345678", ieee80211w="2",
+ key_mgmt="WPA-PSK", proto="WPA2", scan_freq="2412")
+ if "[WPA2-PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"):
+ raise Exception("Scan results missing RSN element info")
+ hwsim_utils.test_connectivity(dev[0], hapd)