aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-10-26 13:48:57 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-26 15:01:37 (GMT)
commit412d764727e8423c3a877414656953b64d61d424 (patch)
treee7c5a2000f40045e931b8e6a460194a7f21508c8 /tests
parentbd43e67e5934074ef3b76e262693f9010576cf06 (diff)
downloadhostap-412d764727e8423c3a877414656953b64d61d424.zip
hostap-412d764727e8423c3a877414656953b64d61d424.tar.gz
hostap-412d764727e8423c3a877414656953b64d61d424.tar.bz2
tests: cfg80211 connect command for WEP connection
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_connect_cmd.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hwsim/test_connect_cmd.py b/tests/hwsim/test_connect_cmd.py
index fb57334..444c532 100644
--- a/tests/hwsim/test_connect_cmd.py
+++ b/tests/hwsim/test_connect_cmd.py
@@ -27,6 +27,36 @@ def test_connect_cmd_open(dev, apdev):
wpas.connect("sta-connect", key_mgmt="NONE", scan_freq="2412")
wpas.request("DISCONNECT")
+def test_connect_cmd_wep(dev, apdev):
+ """WEP Open System using cfg80211 connect command"""
+ params = { "ssid": "sta-connect-wep", "wep_key0": '"hello"' }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
+ wpas.connect("sta-connect-wep", key_mgmt="NONE", scan_freq="2412",
+ wep_key0='"hello"')
+ hwsim_utils.test_connectivity(wpas, hapd)
+ wpas.request("DISCONNECT")
+
+def test_connect_cmd_wep_shared(dev, apdev):
+ """WEP Shared key using cfg80211 connect command"""
+ params = { "ssid": "sta-connect-wep", "wep_key0": '"hello"',
+ "auth_algs": "2" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
+ id = wpas.connect("sta-connect-wep", key_mgmt="NONE", scan_freq="2412",
+ auth_alg="SHARED", wep_key0='"hello"')
+ hwsim_utils.test_connectivity(wpas, hapd)
+ wpas.request("DISCONNECT")
+ wpas.remove_network(id)
+ wpas.connect("sta-connect-wep", key_mgmt="NONE", scan_freq="2412",
+ auth_alg="OPEN SHARED", wep_key0='"hello"')
+ hwsim_utils.test_connectivity(wpas, hapd)
+ wpas.request("DISCONNECT")
+
def test_connect_cmd_p2p_management(dev, apdev):
"""Open connection using cfg80211 connect command and AP using P2P management"""
params = { "ssid": "sta-connect",