|
@@ -1354,6 +1354,30 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)
|
|
|
}
|
|
|
|
|
|
use_provided:
|
|
|
+#ifdef CONFIG_WPS_TESTING_EXTRA_CRED
|
|
|
+ cred = wpabuf_alloc(200);
|
|
|
+ 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);
|
|
|
+
|
|
|
+ wpabuf_put_be16(msg, ATTR_CRED);
|
|
|
+ wpabuf_put_be16(msg, wpabuf_len(cred));
|
|
|
+ wpabuf_put_buf(msg, cred);
|
|
|
+
|
|
|
+ wpabuf_free(cred);
|
|
|
+ }
|
|
|
+#endif /* CONFIG_WPS_TESTING_EXTRA_CRED */
|
|
|
+
|
|
|
cred = wpabuf_alloc(200);
|
|
|
if (cred == NULL)
|
|
|
return -1;
|