]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: PeerKey attempt with unknown peer
authorJouni Malinen <j@w1.fi>
Fri, 14 Mar 2014 22:47:06 +0000 (00:47 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 14 Mar 2014 22:47:06 +0000 (00:47 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_peerkey.py

index 7371b405f1ef2e28ff998c16ecf6d1eb9d835566..6234a700bf74129c277d3dea6c5d26b83634e3af 100644 (file)
@@ -29,3 +29,18 @@ def test_peerkey(dev, apdev):
     # mac80211_hwsim, so this operation fails at setting the keys after
     # successfully completed 4-way handshake. This test case does allow the
     # key negotiation part to be tested for coverage, though.
+
+def test_peerkey_unknown_peer(dev, apdev):
+    """RSN AP and PeerKey attempt with unknown peer"""
+    ssid = "test-peerkey"
+    passphrase = "12345678"
+    params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
+    params['peerkey'] = "1"
+    hostapd.add_ap(apdev[0]['ifname'], params)
+
+    dev[0].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
+    dev[1].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
+    hwsim_utils.test_connectivity_sta(dev[0], dev[1])
+
+    dev[0].request("STKSTART " + dev[2].p2p_interface_addr())
+    time.sleep(0.5)