Replace the word "dummy" with the inclusive word "stub".
Signed-off-by: Arowa Suliman <arowa@chromium.org>
wps_version_number & 0x0f);
hostapd_wps_update_ie(hapd);
}
- } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) {
- wps_testing_dummy_cred = atoi(value);
- wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d",
- wps_testing_dummy_cred);
+ } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) {
+ wps_testing_stub_cred = atoi(value);
+ wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d",
+ wps_testing_stub_cred);
} else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) {
wps_corrupt_pkhash = atoi(value);
wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d",
{
#ifdef CONFIG_WPS_TESTING
wps_version_number = 0x20;
- wps_testing_dummy_cred = 0;
+ wps_testing_stub_cred = 0;
wps_corrupt_pkhash = 0;
#endif /* CONFIG_WPS_TESTING */
int arg = get_cmd_arg_num(str, pos);
const char *fields[] = {
#ifdef CONFIG_WPS_TESTING
- "wps_version_number", "wps_testing_dummy_cred",
+ "wps_version_number", "wps_testing_stub_cred",
"wps_corrupt_pkhash",
#endif /* CONFIG_WPS_TESTING */
#ifdef CONFIG_INTERWORKING
#ifdef CONFIG_WPS_TESTING
int wps_version_number = 0x20;
-int wps_testing_dummy_cred = 0;
+int wps_testing_stub_cred = 0;
int wps_corrupt_pkhash = 0;
int wps_force_auth_types_in_use = 0;
u16 wps_force_auth_types = 0;
#ifdef CONFIG_WPS_TESTING
extern int wps_version_number;
-extern int wps_testing_dummy_cred;
+extern int wps_testing_stub_cred;
extern int wps_corrupt_pkhash;
extern int wps_force_auth_types_in_use;
extern u16 wps_force_auth_types;
use_provided:
#ifdef CONFIG_WPS_TESTING
- if (wps_testing_dummy_cred)
+ if (wps_testing_stub_cred)
cred = wpabuf_alloc(200);
else
cred = NULL;
if (cred) {
- struct wps_credential dummy;
- wpa_printf(MSG_DEBUG, "WPS: Add dummy credential");
- os_memset(&dummy, 0, sizeof(dummy));
- os_memcpy(dummy.ssid, "dummy", 5);
- dummy.ssid_len = 5;
- dummy.auth_type = WPS_AUTH_WPA2PSK;
- dummy.encr_type = WPS_ENCR_AES;
- os_memcpy(dummy.key, "dummy psk", 9);
- dummy.key_len = 9;
- os_memcpy(dummy.mac_addr, wps->mac_addr_e, ETH_ALEN);
- wps_build_credential(cred, &dummy);
- wpa_hexdump_buf(MSG_DEBUG, "WPS: Dummy Credential", cred);
+ struct wps_credential stub;
+ wpa_printf(MSG_DEBUG, "WPS: Add stub credential");
+ os_memset(&stub, 0, sizeof(stub));
+ os_memcpy(stub.ssid, "stub", 5);
+ stub.ssid_len = 5;
+ stub.auth_type = WPS_AUTH_WPA2PSK;
+ stub.encr_type = WPS_ENCR_AES;
+ os_memcpy(stub.key, "stub psk", 9);
+ stub.key_len = 9;
+ os_memcpy(stub.mac_addr, wps->mac_addr_e, ETH_ALEN);
+ wps_build_credential(cred, &stub);
+ wpa_hexdump_buf(MSG_DEBUG, "WPS: Stub Credential", cred);
wpabuf_put_be16(msg, ATTR_CRED);
wpabuf_put_be16(msg, wpabuf_len(cred));
if "FAIL" not in hapd.request("WPS_PBC"):
raise Exception("WPS unexpectedly enabled")
-def test_ap_wps_conf_dummy_cred(dev, apdev):
- """WPS PIN provisioning with configured AP using dummy cred"""
+def test_ap_wps_conf_stub_cred(dev, apdev):
+ """WPS PIN provisioning with configured AP using stub cred"""
ssid = "test-wps-conf"
hapd = hostapd.add_ap(apdev[0],
{"ssid": ssid, "eap_server": "1", "wps_state": "2",
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
dev[0].dump_monitor()
try:
- hapd.set("wps_testing_dummy_cred", "1")
+ hapd.set("wps_testing_stub_cred", "1")
dev[0].request("WPS_PIN " + apdev[0]['bssid'] + " 12345670")
for i in range(1, 3):
ev = dev[0].wait_event(["WPS-CRED-RECEIVED"], timeout=15)
raise Exception("WPS credential %d not received" % i)
dev[0].wait_connected(timeout=30)
finally:
- hapd.set("wps_testing_dummy_cred", "0")
+ hapd.set("wps_testing_stub_cred", "0")
def test_ap_wps_rf_bands(dev, apdev):
"""WPS and wps_rf_bands configuration"""
@remote_compatible
def test_autogo_extra_cred(dev):
"""P2P autonomous GO sending two WPS credentials"""
- if "FAIL" in dev[0].request("SET wps_testing_dummy_cred 1"):
+ if "FAIL" in dev[0].request("SET wps_testing_stub_cred 1"):
raise Exception("Failed to enable test mode")
autogo(dev[0], freq=2412)
connect_cli(dev[0], dev[1], social=True, freq=2412)
(wps_version_number & 0xf0) >> 4,
wps_version_number & 0x0f);
}
- } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) {
- wps_testing_dummy_cred = atoi(value);
- wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d",
- wps_testing_dummy_cred);
+ } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) {
+ wps_testing_stub_cred = atoi(value);
+ wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d",
+ wps_testing_stub_cred);
} else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) {
wps_corrupt_pkhash = atoi(value);
wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d",
#ifdef CONFIG_WPS_TESTING
wps_version_number = 0x20;
- wps_testing_dummy_cred = 0;
+ wps_testing_stub_cred = 0;
wps_corrupt_pkhash = 0;
wps_force_auth_types_in_use = 0;
wps_force_encr_types_in_use = 0;