|
@@ -41,7 +41,7 @@ def wps_start_ap(apdev, ssid="test-wps-conf"):
|
|
def test_ap_wps_init(dev, apdev):
|
|
def test_ap_wps_init(dev, apdev):
|
|
"""Initial AP configuration with first WPS Enrollee"""
|
|
"""Initial AP configuration with first WPS Enrollee"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
@@ -98,8 +98,8 @@ def test_ap_wps_init_2ap_pbc(dev, apdev):
|
|
"""Initial two-radio AP configuration with first WPS PBC Enrollee"""
|
|
"""Initial two-radio AP configuration with first WPS PBC Enrollee"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
- hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
|
|
+ hostapd.add_ap(apdev[1], params)
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
@@ -135,8 +135,8 @@ def test_ap_wps_init_2ap_pin(dev, apdev):
|
|
"""Initial two-radio AP configuration with first WPS PIN Enrollee"""
|
|
"""Initial two-radio AP configuration with first WPS PIN Enrollee"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
- hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
|
|
+ hostapd.add_ap(apdev[1], params)
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
@@ -165,7 +165,7 @@ def test_ap_wps_init_2ap_pin(dev, apdev):
|
|
def test_ap_wps_init_through_wps_config(dev, apdev):
|
|
def test_ap_wps_init_through_wps_config(dev, apdev):
|
|
"""Initial AP configuration using wps_config command"""
|
|
"""Initial AP configuration using wps_config command"""
|
|
ssid = "test-wps-init-config"
|
|
ssid = "test-wps-init-config"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
if "FAIL" in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "12345678".encode("hex")):
|
|
if "FAIL" in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "12345678".encode("hex")):
|
|
@@ -184,7 +184,7 @@ def test_ap_wps_init_through_wps_config(dev, apdev):
|
|
def test_ap_wps_init_through_wps_config_2(dev, apdev):
|
|
def test_ap_wps_init_through_wps_config_2(dev, apdev):
|
|
"""AP configuration using wps_config and wps_cred_processing=2"""
|
|
"""AP configuration using wps_config and wps_cred_processing=2"""
|
|
ssid = "test-wps-init-config"
|
|
ssid = "test-wps-init-config"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
"wps_cred_processing": "2" })
|
|
"wps_cred_processing": "2" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
@@ -199,7 +199,7 @@ def test_ap_wps_init_through_wps_config_2(dev, apdev):
|
|
def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
|
|
def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
|
|
"""AP configuration using wps_config command with invalid passphrase"""
|
|
"""AP configuration using wps_config command with invalid passphrase"""
|
|
ssid = "test-wps-init-config"
|
|
ssid = "test-wps-init-config"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
if "FAIL" not in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "1234567".encode("hex")):
|
|
if "FAIL" not in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "1234567".encode("hex")):
|
|
@@ -208,7 +208,7 @@ def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
|
|
def test_ap_wps_conf(dev, apdev):
|
|
def test_ap_wps_conf(dev, apdev):
|
|
"""WPS PBC provisioning with configured AP"""
|
|
"""WPS PBC provisioning with configured AP"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -244,7 +244,7 @@ def test_ap_wps_conf_5ghz(dev, apdev):
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"country_code": "FI", "hw_mode": "a", "channel": "36" }
|
|
"country_code": "FI", "hw_mode": "a", "channel": "36" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="5180")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="5180")
|
|
@@ -270,7 +270,7 @@ def test_ap_wps_conf_chan14(dev, apdev):
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"country_code": "JP", "hw_mode": "b", "channel": "14" }
|
|
"country_code": "JP", "hw_mode": "b", "channel": "14" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
dev[0].request("WPS_PBC")
|
|
dev[0].request("WPS_PBC")
|
|
@@ -292,7 +292,7 @@ def test_ap_wps_twice(dev, apdev):
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
@@ -306,7 +306,7 @@ def test_ap_wps_twice(dev, apdev):
|
|
hapd_global = hostapd.HostapdGlobal()
|
|
hapd_global = hostapd.HostapdGlobal()
|
|
hapd_global.remove(apdev[0]['ifname'])
|
|
hapd_global.remove(apdev[0]['ifname'])
|
|
params['wpa_passphrase'] = 'another passphrase'
|
|
params['wpa_passphrase'] = 'another passphrase'
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
@@ -320,7 +320,7 @@ def test_ap_wps_twice(dev, apdev):
|
|
def test_ap_wps_incorrect_pin(dev, apdev):
|
|
def test_ap_wps_incorrect_pin(dev, apdev):
|
|
"""WPS PIN provisioning with incorrect PIN"""
|
|
"""WPS PIN provisioning with incorrect PIN"""
|
|
ssid = "test-wps-incorrect-pin"
|
|
ssid = "test-wps-incorrect-pin"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -363,7 +363,7 @@ def test_ap_wps_incorrect_pin(dev, apdev):
|
|
def test_ap_wps_conf_pin(dev, apdev):
|
|
def test_ap_wps_conf_pin(dev, apdev):
|
|
"""WPS PIN provisioning with configured AP"""
|
|
"""WPS PIN provisioning with configured AP"""
|
|
ssid = "test-wps-conf-pin"
|
|
ssid = "test-wps-conf-pin"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -402,7 +402,7 @@ def test_ap_wps_conf_pin(dev, apdev):
|
|
def test_ap_wps_conf_pin_mixed_mode(dev, apdev):
|
|
def test_ap_wps_conf_pin_mixed_mode(dev, apdev):
|
|
"""WPS PIN provisioning with configured AP (WPA+WPA2)"""
|
|
"""WPS PIN provisioning with configured AP (WPA+WPA2)"""
|
|
ssid = "test-wps-conf-pin-mixed"
|
|
ssid = "test-wps-conf-pin-mixed"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -460,7 +460,7 @@ def test_ap_wps_conf_pin_mixed_mode(dev, apdev):
|
|
def test_ap_wps_conf_pin_v1(dev, apdev):
|
|
def test_ap_wps_conf_pin_v1(dev, apdev):
|
|
"""WPS PIN provisioning with configured WPS v1.0 AP"""
|
|
"""WPS PIN provisioning with configured WPS v1.0 AP"""
|
|
ssid = "test-wps-conf-pin-v1"
|
|
ssid = "test-wps-conf-pin-v1"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -486,7 +486,7 @@ def test_ap_wps_conf_pin_v1(dev, apdev):
|
|
def test_ap_wps_conf_pin_2sta(dev, apdev):
|
|
def test_ap_wps_conf_pin_2sta(dev, apdev):
|
|
"""Two stations trying to use WPS PIN at the same time"""
|
|
"""Two stations trying to use WPS PIN at the same time"""
|
|
ssid = "test-wps-conf-pin2"
|
|
ssid = "test-wps-conf-pin2"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -508,7 +508,7 @@ def test_ap_wps_conf_pin_2sta(dev, apdev):
|
|
def test_ap_wps_conf_pin_timeout(dev, apdev):
|
|
def test_ap_wps_conf_pin_timeout(dev, apdev):
|
|
"""WPS PIN provisioning with configured AP timing out PIN"""
|
|
"""WPS PIN provisioning with configured AP timing out PIN"""
|
|
ssid = "test-wps-conf-pin"
|
|
ssid = "test-wps-conf-pin"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -537,7 +537,7 @@ def test_ap_wps_reg_connect(dev, apdev):
|
|
"""WPS registrar using AP PIN to connect"""
|
|
"""WPS registrar using AP PIN to connect"""
|
|
ssid = "test-wps-reg-ap-pin"
|
|
ssid = "test-wps-reg-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -560,7 +560,7 @@ def test_ap_wps_reg_connect_mixed_mode(dev, apdev):
|
|
"""WPS registrar using AP PIN to connect (WPA+WPA2)"""
|
|
"""WPS registrar using AP PIN to connect (WPA+WPA2)"""
|
|
ssid = "test-wps-reg-ap-pin"
|
|
ssid = "test-wps-reg-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -595,12 +595,12 @@ def test_ap_wps_reg_override_ap_settings(dev, apdev):
|
|
f.write(data)
|
|
f.write(data)
|
|
ssid = "test-wps-reg-ap-pin"
|
|
ssid = "test-wps-reg-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"ap_pin": appin, "ap_settings": ap_settings })
|
|
"ap_pin": appin, "ap_settings": ap_settings })
|
|
- hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test" })
|
|
|
|
|
|
+ hapd2 = hostapd.add_ap(apdev[1], { "ssid": "test" })
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], appin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], appin)
|
|
@@ -623,7 +623,7 @@ def test_ap_wps_random_ap_pin(dev, apdev):
|
|
"""WPS registrar using random AP PIN"""
|
|
"""WPS registrar using random AP PIN"""
|
|
ssid = "test-wps-reg-random-ap-pin"
|
|
ssid = "test-wps-reg-random-ap-pin"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -686,7 +686,7 @@ def test_ap_wps_reg_config(dev, apdev):
|
|
"""WPS registrar configuring an AP using AP PIN"""
|
|
"""WPS registrar configuring an AP using AP PIN"""
|
|
ssid = "test-wps-init-ap-pin"
|
|
ssid = "test-wps-init-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"ap_pin": appin})
|
|
"ap_pin": appin})
|
|
logger.info("WPS configuration step")
|
|
logger.info("WPS configuration step")
|
|
@@ -725,7 +725,7 @@ def test_ap_wps_reg_config_ext_processing(dev, apdev):
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wps_cred_processing": "1", "ap_pin": appin}
|
|
"wps_cred_processing": "1", "ap_pin": appin}
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
new_ssid = "wps-new-ssid"
|
|
new_ssid = "wps-new-ssid"
|
|
new_passphrase = "1234567890"
|
|
new_passphrase = "1234567890"
|
|
@@ -749,7 +749,7 @@ def test_ap_wps_reg_config_tkip(dev, apdev):
|
|
skip_with_fips(dev[0])
|
|
skip_with_fips(dev[0])
|
|
ssid = "test-wps-init-ap"
|
|
ssid = "test-wps-init-ap"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
"ap_pin": appin})
|
|
"ap_pin": appin})
|
|
logger.info("WPS configuration step")
|
|
logger.info("WPS configuration step")
|
|
@@ -780,7 +780,7 @@ def test_ap_wps_setup_locked(dev, apdev):
|
|
"""WPS registrar locking up AP setup on AP PIN failures"""
|
|
"""WPS registrar locking up AP setup on AP PIN failures"""
|
|
ssid = "test-wps-incorrect-ap-pin"
|
|
ssid = "test-wps-incorrect-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -847,7 +847,7 @@ def test_ap_wps_setup_locked_timeout(dev, apdev):
|
|
"""WPS re-enabling AP PIN after timeout"""
|
|
"""WPS re-enabling AP PIN after timeout"""
|
|
ssid = "test-wps-incorrect-ap-pin"
|
|
ssid = "test-wps-incorrect-ap-pin"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -890,7 +890,7 @@ def test_ap_wps_setup_locked_2(dev, apdev):
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"ap_pin": appin, "ap_setup_locked": "2" }
|
|
"ap_pin": appin, "ap_setup_locked": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
new_ssid = "wps-new-ssid-test"
|
|
new_ssid = "wps-new-ssid-test"
|
|
new_passphrase = "1234567890"
|
|
new_passphrase = "1234567890"
|
|
|
|
|
|
@@ -922,12 +922,12 @@ def test_ap_wps_setup_locked_2(dev, apdev):
|
|
|
|
|
|
def test_ap_wps_pbc_overlap_2ap(dev, apdev):
|
|
def test_ap_wps_pbc_overlap_2ap(dev, apdev):
|
|
"""WPS PBC session overlap with two active APs"""
|
|
"""WPS PBC session overlap with two active APs"""
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": "wps1", "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": "wps1", "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wps_independent": "1"})
|
|
"wps_independent": "1"})
|
|
- hostapd.add_ap(apdev[1]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1],
|
|
{ "ssid": "wps2", "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": "wps2", "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "123456789", "wpa": "2",
|
|
"wpa_passphrase": "123456789", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -950,7 +950,7 @@ def test_ap_wps_pbc_overlap_2ap(dev, apdev):
|
|
def test_ap_wps_pbc_overlap_2sta(dev, apdev):
|
|
def test_ap_wps_pbc_overlap_2sta(dev, apdev):
|
|
"""WPS PBC session overlap with two active STAs"""
|
|
"""WPS PBC session overlap with two active STAs"""
|
|
ssid = "test-wps-pbc-overlap"
|
|
ssid = "test-wps-pbc-overlap"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -988,7 +988,7 @@ def test_ap_wps_pbc_overlap_2sta(dev, apdev):
|
|
def test_ap_wps_cancel(dev, apdev):
|
|
def test_ap_wps_cancel(dev, apdev):
|
|
"""WPS AP cancelling enabled config method"""
|
|
"""WPS AP cancelling enabled config method"""
|
|
ssid = "test-wps-ap-cancel"
|
|
ssid = "test-wps-ap-cancel"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
@@ -1036,7 +1036,7 @@ def _test_ap_wps_er_add_enrollee(dev, apdev):
|
|
ssid = "wps-er-add-enrollee"
|
|
ssid = "wps-er-add-enrollee"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
|
"device_name": "Wireless AP", "manufacturer": "Company",
|
|
"device_name": "Wireless AP", "manufacturer": "Company",
|
|
"model_name": "WAP", "model_number": "123",
|
|
"model_name": "WAP", "model_number": "123",
|
|
@@ -1169,7 +1169,7 @@ def _test_ap_wps_er_add_enrollee_uuid(dev, apdev):
|
|
ssid = "wps-er-add-enrollee"
|
|
ssid = "wps-er-add-enrollee"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1261,7 +1261,7 @@ def _test_ap_wps_er_multi_add_enrollee(dev, apdev):
|
|
ssid = "wps-er-add-enrollee"
|
|
ssid = "wps-er-add-enrollee"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1321,7 +1321,7 @@ def _test_ap_wps_er_add_enrollee_pbc(dev, apdev):
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1392,7 +1392,7 @@ def _test_ap_wps_er_pbc_overlap(dev, apdev):
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1467,7 +1467,7 @@ def _test_ap_wps_er_v10_add_enrollee_pin(dev, apdev):
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ssid = "wps-er-add-enrollee-pbc"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1521,7 +1521,7 @@ def _test_ap_wps_er_config_ap(dev, apdev):
|
|
ssid = "wps-er-ap-config"
|
|
ssid = "wps-er-ap-config"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1584,7 +1584,7 @@ def _test_ap_wps_er_cache_ap_settings(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
@@ -1616,7 +1616,7 @@ def _test_ap_wps_er_cache_ap_settings(dev, apdev):
|
|
if ev is None:
|
|
if ev is None:
|
|
raise Exception("AP removal or disconnection timed out")
|
|
raise Exception("AP removal or disconnection timed out")
|
|
|
|
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
for i in range(2):
|
|
for i in range(2):
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
timeout=15)
|
|
timeout=15)
|
|
@@ -1663,7 +1663,7 @@ def _test_ap_wps_er_cache_ap_settings_oom(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
@@ -1696,7 +1696,7 @@ def _test_ap_wps_er_cache_ap_settings_oom(dev, apdev):
|
|
if ev is None:
|
|
if ev is None:
|
|
raise Exception("AP removal or disconnection timed out")
|
|
raise Exception("AP removal or disconnection timed out")
|
|
|
|
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
for i in range(2):
|
|
for i in range(2):
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
timeout=15)
|
|
timeout=15)
|
|
@@ -1725,7 +1725,7 @@ def _test_ap_wps_er_cache_ap_settings_oom2(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
@@ -1758,7 +1758,7 @@ def _test_ap_wps_er_cache_ap_settings_oom2(dev, apdev):
|
|
if ev is None:
|
|
if ev is None:
|
|
raise Exception("AP removal or disconnection timed out")
|
|
raise Exception("AP removal or disconnection timed out")
|
|
|
|
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
for i in range(2):
|
|
for i in range(2):
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
|
timeout=15)
|
|
timeout=15)
|
|
@@ -1787,7 +1787,7 @@ def _test_ap_wps_er_subscribe_oom(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
id = int(dev[0].list_networks()[0]['id'])
|
|
@@ -1826,7 +1826,7 @@ def _test_ap_wps_er_set_sel_reg_oom(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
|
|
|
|
@@ -1877,7 +1877,7 @@ def _test_ap_wps_er_learn_oom(dev, apdev):
|
|
"os_version": "01020300",
|
|
"os_version": "01020300",
|
|
"config_methods": "label push_button",
|
|
"config_methods": "label push_button",
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
|
|
|
|
|
@@ -1911,7 +1911,7 @@ def test_ap_wps_fragmentation(dev, apdev):
|
|
"""WPS with fragmentation in EAP-WSC and mixed mode WPA+WPA2"""
|
|
"""WPS with fragmentation in EAP-WSC and mixed mode WPA+WPA2"""
|
|
ssid = "test-wps-fragmentation"
|
|
ssid = "test-wps-fragmentation"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_passphrase": "12345678", "wpa": "3",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -1963,7 +1963,7 @@ def test_ap_wps_fragmentation(dev, apdev):
|
|
def test_ap_wps_new_version_sta(dev, apdev):
|
|
def test_ap_wps_new_version_sta(dev, apdev):
|
|
"""WPS compatibility with new version number on the station"""
|
|
"""WPS compatibility with new version number on the station"""
|
|
ssid = "test-wps-ver"
|
|
ssid = "test-wps-ver"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
@@ -1980,7 +1980,7 @@ def test_ap_wps_new_version_sta(dev, apdev):
|
|
def test_ap_wps_new_version_ap(dev, apdev):
|
|
def test_ap_wps_new_version_ap(dev, apdev):
|
|
"""WPS compatibility with new version number on the AP"""
|
|
"""WPS compatibility with new version number on the AP"""
|
|
ssid = "test-wps-ver"
|
|
ssid = "test-wps-ver"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
@@ -1997,7 +1997,7 @@ def test_ap_wps_new_version_ap(dev, apdev):
|
|
|
|
|
|
def test_ap_wps_check_pin(dev, apdev):
|
|
def test_ap_wps_check_pin(dev, apdev):
|
|
"""Verify PIN checking through control interface"""
|
|
"""Verify PIN checking through control interface"""
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": "wps", "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": "wps", "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
|
@@ -2031,7 +2031,7 @@ def test_ap_wps_wep_config(dev, apdev):
|
|
"""WPS 2.0 AP rejecting WEP configuration"""
|
|
"""WPS 2.0 AP rejecting WEP configuration"""
|
|
ssid = "test-wps-config"
|
|
ssid = "test-wps-config"
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"ap_pin": appin})
|
|
"ap_pin": appin})
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
@@ -2054,7 +2054,7 @@ def test_ap_wps_wep_config(dev, apdev):
|
|
def test_ap_wps_wep_enroll(dev, apdev):
|
|
def test_ap_wps_wep_enroll(dev, apdev):
|
|
"""WPS 2.0 STA rejecting WEP configuration"""
|
|
"""WPS 2.0 STA rejecting WEP configuration"""
|
|
ssid = "test-wps-wep"
|
|
ssid = "test-wps-wep"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"skip_cred_build": "1", "extra_cred": "wps-wep-cred" })
|
|
"skip_cred_build": "1", "extra_cred": "wps-wep-cred" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
@@ -2078,7 +2078,7 @@ def test_ap_wps_ie_fragmentation(dev, apdev):
|
|
"model_name": "1234567890abcdef1234567890abcdef",
|
|
"model_name": "1234567890abcdef1234567890abcdef",
|
|
"model_number": "1234567890abcdef1234567890abcdef",
|
|
"model_number": "1234567890abcdef1234567890abcdef",
|
|
"serial_number": "1234567890abcdef1234567890abcdef" }
|
|
"serial_number": "1234567890abcdef1234567890abcdef" }
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
@@ -2133,7 +2133,7 @@ def test_ap_wps_per_station_psk(dev, apdev):
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"wpa_psk_file": pskfile }
|
|
"wpa_psk_file": pskfile }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
|
|
|
|
logger.info("First enrollee")
|
|
logger.info("First enrollee")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
@@ -2207,7 +2207,7 @@ def test_ap_wps_per_station_psk_failure(dev, apdev):
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"wpa_psk_file": pskfile }
|
|
"wpa_psk_file": pskfile }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
if "FAIL" in hapd.request("SET wpa_psk_file /tmp/does/not/exists/ap_wps_per_enrollee_psk_failure.psk_file"):
|
|
if "FAIL" in hapd.request("SET wpa_psk_file /tmp/does/not/exists/ap_wps_per_enrollee_psk_failure.psk_file"):
|
|
raise Exception("Failed to set wpa_psk_file")
|
|
raise Exception("Failed to set wpa_psk_file")
|
|
|
|
|
|
@@ -2240,7 +2240,7 @@ def test_ap_wps_pin_request_file(dev, apdev):
|
|
pinfile = "/tmp/ap_wps_pin_request_file.log"
|
|
pinfile = "/tmp/ap_wps_pin_request_file.log"
|
|
if os.path.exists(pinfile):
|
|
if os.path.exists(pinfile):
|
|
os.remove(pinfile)
|
|
os.remove(pinfile)
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wps_pin_requests": pinfile,
|
|
"wps_pin_requests": pinfile,
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
@@ -3435,7 +3435,7 @@ def test_ap_wps_upnp_http_proto_chunked(dev, apdev):
|
|
def test_ap_wps_disabled(dev, apdev):
|
|
def test_ap_wps_disabled(dev, apdev):
|
|
"""WPS operations while WPS is disabled"""
|
|
"""WPS operations while WPS is disabled"""
|
|
ssid = "test-wps-disabled"
|
|
ssid = "test-wps-disabled"
|
|
- hostapd.add_ap(apdev[0]['ifname'], { "ssid": ssid })
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], { "ssid": ssid })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
if "FAIL" not in hapd.request("WPS_PBC"):
|
|
if "FAIL" not in hapd.request("WPS_PBC"):
|
|
raise Exception("WPS_PBC succeeded unexpectedly")
|
|
raise Exception("WPS_PBC succeeded unexpectedly")
|
|
@@ -3445,7 +3445,7 @@ def test_ap_wps_disabled(dev, apdev):
|
|
def test_ap_wps_mixed_cred(dev, apdev):
|
|
def test_ap_wps_mixed_cred(dev, apdev):
|
|
"""WPS 2.0 STA merging mixed mode WPA/WPA2 credentials"""
|
|
"""WPS 2.0 STA merging mixed mode WPA/WPA2 credentials"""
|
|
ssid = "test-wps-wep"
|
|
ssid = "test-wps-wep"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"skip_cred_build": "1", "extra_cred": "wps-mixed-cred" })
|
|
"skip_cred_build": "1", "extra_cred": "wps-mixed-cred" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
@@ -3469,13 +3469,13 @@ def test_ap_wps_mixed_cred(dev, apdev):
|
|
def test_ap_wps_while_connected(dev, apdev):
|
|
def test_ap_wps_while_connected(dev, apdev):
|
|
"""WPS PBC provisioning while connected to another AP"""
|
|
"""WPS PBC provisioning while connected to another AP"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
|
|
|
|
- hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1], { "ssid": "open" })
|
|
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
|
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
|
|
|
|
|
logger.info("WPS provisioning step")
|
|
logger.info("WPS provisioning step")
|
|
@@ -3490,13 +3490,13 @@ def test_ap_wps_while_connected(dev, apdev):
|
|
def test_ap_wps_while_connected_no_autoconnect(dev, apdev):
|
|
def test_ap_wps_while_connected_no_autoconnect(dev, apdev):
|
|
"""WPS PBC provisioning while connected to another AP and STA_AUTOCONNECT disabled"""
|
|
"""WPS PBC provisioning while connected to another AP and STA_AUTOCONNECT disabled"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
|
|
|
|
- hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1], { "ssid": "open" })
|
|
|
|
|
|
try:
|
|
try:
|
|
dev[0].request("STA_AUTOCONNECT 0")
|
|
dev[0].request("STA_AUTOCONNECT 0")
|
|
@@ -3516,7 +3516,7 @@ def test_ap_wps_while_connected_no_autoconnect(dev, apdev):
|
|
def test_ap_wps_from_event(dev, apdev):
|
|
def test_ap_wps_from_event(dev, apdev):
|
|
"""WPS PBC event on AP to enable PBC"""
|
|
"""WPS PBC event on AP to enable PBC"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -3539,7 +3539,7 @@ def test_ap_wps_from_event(dev, apdev):
|
|
def test_ap_wps_ap_scan_2(dev, apdev):
|
|
def test_ap_wps_ap_scan_2(dev, apdev):
|
|
"""AP_SCAN 2 for WPS"""
|
|
"""AP_SCAN 2 for WPS"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -3571,7 +3571,7 @@ def test_ap_wps_ap_scan_2(dev, apdev):
|
|
def test_ap_wps_eapol_workaround(dev, apdev):
|
|
def test_ap_wps_eapol_workaround(dev, apdev):
|
|
"""EAPOL workaround code path for 802.1X header length mismatch"""
|
|
"""EAPOL workaround code path for 802.1X header length mismatch"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
bssid = apdev[0]['bssid']
|
|
bssid = apdev[0]['bssid']
|
|
@@ -3591,13 +3591,13 @@ def test_ap_wps_eapol_workaround(dev, apdev):
|
|
def test_ap_wps_iteration(dev, apdev):
|
|
def test_ap_wps_iteration(dev, apdev):
|
|
"""WPS PIN and iterate through APs without selected registrar"""
|
|
"""WPS PIN and iterate through APs without selected registrar"""
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
|
|
|
|
ssid2 = "test-wps-conf2"
|
|
ssid2 = "test-wps-conf2"
|
|
- hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
|
|
|
|
|
+ hapd2 = hostapd.add_ap(apdev[1],
|
|
{ "ssid": ssid2, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid2, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -3633,7 +3633,7 @@ def test_ap_wps_iteration(dev, apdev):
|
|
def test_ap_wps_iteration_error(dev, apdev):
|
|
def test_ap_wps_iteration_error(dev, apdev):
|
|
"""WPS AP iteration on no Selected Registrar and error case with an AP"""
|
|
"""WPS AP iteration on no Selected Registrar and error case with an AP"""
|
|
ssid = "test-wps-conf-pin"
|
|
ssid = "test-wps-conf-pin"
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -3659,7 +3659,7 @@ def test_ap_wps_iteration_error(dev, apdev):
|
|
# a case with an incorrectly behaving WPS AP.
|
|
# a case with an incorrectly behaving WPS AP.
|
|
|
|
|
|
# Start the real target AP and activate registrar on it.
|
|
# Start the real target AP and activate registrar on it.
|
|
- hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
|
|
|
|
|
+ hapd2 = hostapd.add_ap(apdev[1],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -3678,7 +3678,7 @@ def test_ap_wps_iteration_error(dev, apdev):
|
|
def test_ap_wps_priority(dev, apdev):
|
|
def test_ap_wps_priority(dev, apdev):
|
|
"""WPS PIN provisioning with configured AP and wps_priority"""
|
|
"""WPS PIN provisioning with configured AP and wps_priority"""
|
|
ssid = "test-wps-conf-pin"
|
|
ssid = "test-wps-conf-pin"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -3702,10 +3702,10 @@ def test_ap_wps_priority(dev, apdev):
|
|
def test_ap_wps_and_non_wps(dev, apdev):
|
|
def test_ap_wps_and_non_wps(dev, apdev):
|
|
"""WPS and non-WPS AP in single hostapd process"""
|
|
"""WPS and non-WPS AP in single hostapd process"""
|
|
params = { "ssid": "wps", "eap_server": "1", "wps_state": "1" }
|
|
params = { "ssid": "wps", "eap_server": "1", "wps_state": "1" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
|
|
|
|
params = { "ssid": "no wps" }
|
|
params = { "ssid": "no wps" }
|
|
- hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hapd2 = hostapd.add_ap(apdev[1], params)
|
|
|
|
|
|
appin = hapd.request("WPS_AP_PIN random")
|
|
appin = hapd.request("WPS_AP_PIN random")
|
|
if "FAIL" in appin:
|
|
if "FAIL" in appin:
|
|
@@ -3722,7 +3722,7 @@ def test_ap_wps_init_oom(dev, apdev):
|
|
"""Initial AP configuration and OOM during PSK generation"""
|
|
"""Initial AP configuration and OOM during PSK generation"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
|
|
|
|
with alloc_fail(hapd, 1, "base64_encode;wps_build_cred"):
|
|
with alloc_fail(hapd, 1, "base64_encode;wps_build_cred"):
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
@@ -3747,7 +3747,7 @@ def _test_ap_wps_er_oom(dev, apdev):
|
|
ssid = "wps-er-ap-config"
|
|
ssid = "wps-er-ap-config"
|
|
ap_pin = "12345670"
|
|
ap_pin = "12345670"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
@@ -3831,7 +3831,7 @@ def test_ap_wps_wpa_cli_action(dev, apdev, test_params):
|
|
stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
|
stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
|
|
|
|
|
ssid = "test-wps-conf"
|
|
ssid = "test-wps-conf"
|
|
- hostapd.add_ap(apdev[0]['ifname'],
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0],
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
|
@@ -4863,7 +4863,7 @@ def test_ap_wps_init_oom(dev, apdev):
|
|
appin = "12345670"
|
|
appin = "12345670"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"ap_pin": appin }
|
|
"ap_pin": appin }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
|
|
|
|
with alloc_fail(hapd, 1, "wps_init"):
|
|
with alloc_fail(hapd, 1, "wps_init"):
|
|
@@ -4909,7 +4909,7 @@ def test_ap_wps_invalid_assoc_req_elem(dev, apdev):
|
|
"""WPS and invalid IE in Association Request frame"""
|
|
"""WPS and invalid IE in Association Request frame"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
pin = "12345670"
|
|
pin = "12345670"
|
|
hapd.request("WPS_PIN any " + pin)
|
|
hapd.request("WPS_PIN any " + pin)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
@@ -4930,7 +4930,7 @@ def test_ap_wps_pbc_pin_mismatch(dev, apdev):
|
|
"""WPS PBC/PIN mismatch"""
|
|
"""WPS PBC/PIN mismatch"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
hapd.request("SET wps_version_number 0x10")
|
|
hapd.request("SET wps_version_number 0x10")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
hapd.request("WPS_PBC")
|
|
hapd.request("WPS_PBC")
|
|
@@ -4949,9 +4949,9 @@ def test_ap_wps_ie_invalid(dev, apdev):
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"vendor_elements": "dd050050f20410" }
|
|
"vendor_elements": "dd050050f20410" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
|
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
|
- hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
dev[0].request("WPS_PIN %s %s" % (apdev[0]['bssid'], pin))
|
|
dev[0].request("WPS_PIN %s %s" % (apdev[0]['bssid'], pin))
|
|
@@ -4964,9 +4964,9 @@ def test_ap_wps_scan_prio_order(dev, apdev):
|
|
"""WPS scan priority ordering"""
|
|
"""WPS scan priority ordering"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
|
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
|
- hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
@@ -4980,7 +4980,7 @@ def test_ap_wps_probe_req_ie_oom(dev, apdev):
|
|
"""WPS ProbeReq IE OOM"""
|
|
"""WPS ProbeReq IE OOM"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
hapd.request("WPS_PIN any " + pin)
|
|
hapd.request("WPS_PIN any " + pin)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
@@ -5008,7 +5008,7 @@ def test_ap_wps_assoc_req_ie_oom(dev, apdev):
|
|
"""WPS AssocReq IE OOM"""
|
|
"""WPS AssocReq IE OOM"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
hapd.request("WPS_PIN any " + pin)
|
|
hapd.request("WPS_PIN any " + pin)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
@@ -5023,7 +5023,7 @@ def test_ap_wps_assoc_resp_ie_oom(dev, apdev):
|
|
"""WPS AssocResp IE OOM"""
|
|
"""WPS AssocResp IE OOM"""
|
|
ssid = "test-wps"
|
|
ssid = "test-wps"
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
hapd.request("WPS_PIN any " + pin)
|
|
hapd.request("WPS_PIN any " + pin)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
@@ -5038,9 +5038,9 @@ def test_ap_wps_bss_info_errors(dev, apdev):
|
|
"""WPS BSS info errors"""
|
|
"""WPS BSS info errors"""
|
|
params = { "ssid": "1",
|
|
params = { "ssid": "1",
|
|
"vendor_elements": "dd0e0050f20410440001ff101100010a" }
|
|
"vendor_elements": "dd0e0050f20410440001ff101100010a" }
|
|
- hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[0], params)
|
|
params = { 'ssid': "2", "vendor_elements": "dd050050f20410" }
|
|
params = { 'ssid': "2", "vendor_elements": "dd050050f20410" }
|
|
- hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hostapd.add_ap(apdev[1], params)
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
|
bss = dev[0].get_bss(apdev[0]['bssid'])
|
|
bss = dev[0].get_bss(apdev[0]['bssid'])
|
|
@@ -5198,7 +5198,7 @@ def test_ap_wps_random_psk_fail(dev, apdev):
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
|
"wpa_psk_file": pskfile }
|
|
"wpa_psk_file": pskfile }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
|
|
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
|
with fail_test(hapd, 1, "os_get_random;wps_build_cred_network_key"):
|
|
with fail_test(hapd, 1, "os_get_random;wps_build_cred_network_key"):
|
|
@@ -5843,12 +5843,12 @@ def test_ap_wps_config_methods(dev, apdev):
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"config_methods": "ethernet display ext_nfc_token int_nfc_token physical_display physical_push_button" }
|
|
"config_methods": "ethernet display ext_nfc_token int_nfc_token physical_display physical_push_button" }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"config_methods": "display push_button" }
|
|
"config_methods": "display push_button" }
|
|
- hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
|
|
|
|
|
+ hapd2 = hostapd.add_ap(apdev[1], params)
|
|
|
|
|
|
def test_ap_wps_set_selected_registrar_proto(dev, apdev):
|
|
def test_ap_wps_set_selected_registrar_proto(dev, apdev):
|
|
"""WPS UPnP SetSelectedRegistrar protocol testing"""
|
|
"""WPS UPnP SetSelectedRegistrar protocol testing"""
|
|
@@ -9328,7 +9328,7 @@ def test_ap_wps_eap_wsc_errors(dev, apdev):
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_passphrase": "12345678", "wpa": "2",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
|
"fragment_size": "300", "ap_pin": appin }
|
|
"fragment_size": "300", "ap_pin": appin }
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
bssid = apdev[0]['bssid']
|
|
bssid = apdev[0]['bssid']
|
|
|
|
|
|
pin = dev[0].wps_read_pin()
|
|
pin = dev[0].wps_read_pin()
|
|
@@ -9401,7 +9401,7 @@ def test_ap_wps_eap_wsc(dev, apdev):
|
|
"""WPS and EAP-WSC in network profile"""
|
|
"""WPS and EAP-WSC in network profile"""
|
|
params = int_eap_server_params()
|
|
params = int_eap_server_params()
|
|
params["wps_state"] = "2"
|
|
params["wps_state"] = "2"
|
|
- hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
|
|
+ hapd = hostapd.add_ap(apdev[0], params)
|
|
bssid = apdev[0]['bssid']
|
|
bssid = apdev[0]['bssid']
|
|
|
|
|
|
logger.info("Unexpected identity")
|
|
logger.info("Unexpected identity")
|