Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching defs:wps

2  * wpa_supplicant / WPS integration
24 #include "wps/wps_attr_parse.h"
64 wpa_printf(MSG_DEBUG, "WPS: PIN registration with " MACSTR
91 wpa_printf(MSG_DEBUG, "WPS: Network configuration replaced - "
97 wpa_printf(MSG_DEBUG, "WPS: Current network is "
106 wpa_printf(MSG_DEBUG, "WPS: Checking whether fast association "
110 struct wpabuf *wps;
113 wps = wpa_bss_get_vendor_ie_multi(bss,
115 if (wps && wps_parse_msg(wps, &attr) == 0 &&
119 wpabuf_free(wps);
129 wpa_printf(MSG_DEBUG, "WPS: Registration completed - waiting "
152 * Many existing WPS APs do not know how to negotiate WPA2 or CCMP in
166 wpa_printf(MSG_DEBUG, "WPS: The AP was not found from BSS "
171 wpa_printf(MSG_DEBUG, "WPS: AP found from BSS table");
193 wpa_printf(MSG_DEBUG, "WPS: The AP did not yet advertise WPA "
201 wpa_printf(MSG_DEBUG, "WPS: Add CCMP into the credential "
212 wpa_printf(MSG_DEBUG, "WPS: Add WPA2 into the credential "
323 wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute",
329 wpa_hexdump_ascii(MSG_DEBUG, "WPS: SSID", cred->ssid, cred->ssid_len);
330 wpa_printf(MSG_DEBUG, "WPS: Authentication Type 0x%x",
332 wpa_printf(MSG_DEBUG, "WPS: Encryption Type 0x%x", cred->encr_type);
333 wpa_printf(MSG_DEBUG, "WPS: Network Key Index %d", cred->key_idx);
334 wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key",
336 wpa_printf(MSG_DEBUG, "WPS: MAC Address " MACSTR,
341 wpa_printf(MSG_DEBUG, "WPS: Workaround - convert mixed-mode "
350 wpa_printf(MSG_DEBUG, "WPS: Ignored credentials for "
358 wpa_printf(MSG_ERROR, "WPS: Reject PSK credential with "
366 wpa_printf(MSG_DEBUG, "WPS: Replace WPS network block based "
390 wpa_printf(MSG_DEBUG, "WPS: Create a new network based on the "
415 wpa_printf(MSG_ERROR, "WPS: Invalid WEP Key length "
420 wpa_printf(MSG_ERROR, "WPS: Invalid WEP Key index %d",
430 wpa_printf(MSG_ERROR, "WPS: Invalid WEP Key "
487 wpa_printf(MSG_ERROR, "WPS: Invalid Network "
503 wpa_printf(MSG_ERROR, "WPS: Invalid Network Key "
520 wpa_printf(MSG_DEBUG, "WPS: Failed to update configuration");
526 * Optimize the post-WPS scan based on the channel used during
573 wpa_printf(MSG_DEBUG, "WPS: Clear WPS network from timeout");
604 * Need to allow WPS processing to complete, e.g., by sending WSC_NACK.
606 wpa_printf(MSG_DEBUG, "WPS: Register timeout to clear WPS network");
639 wpa_printf(MSG_DEBUG, "WPS: Failed to update "
892 /* Remove any existing WPS network from configuration */
940 if (wpa_config_set(ssid, "key_mgmt", "WPS", 0) < 0 ||
960 * Note: With P2P, the SSID may change at the time the WPS
975 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Picked SSID from "
982 wpa_printf(MSG_DEBUG, "WPS: More than one SSID found "
1073 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Use specific AP "
1109 wpa_hexdump_ascii(MSG_DEBUG, "WPS: Use specific AP "
1134 /* Cancel the wps pbc/pin requests */
1139 wpa_printf(MSG_DEBUG, "WPS: Cancelling in AP mode");
1146 wpa_printf(MSG_DEBUG, "WPS: Cancel operation - cancel scan");
1150 wpa_printf(MSG_DEBUG, "WPS: Cancel operation - "
1214 "Received new WPA/WPA2-PSK from WPS for STA " MACSTR,
1218 "Received new WPA/WPA2-PSK from WPS for STA " MACSTR
1238 wpa_printf(MSG_DEBUG, "WPS: PIN needed for UUID-E %s", uuid);
1239 len = os_snprintf(txt, sizeof(txt), "WPS-EVENT-PIN-NEEDED %s " MACSTR
1259 wpa_printf(MSG_DEBUG, "WPS ER: SetSelectedRegistrar - sel_reg=%d "
1274 wpa_printf(MSG_INFO, "WPS: Converting display to "
1275 "virtual_display for WPS 2.0 compliance");
1281 wpa_printf(MSG_INFO, "WPS: Converting push_button to "
1282 "virtual_push_button for WPS 2.0 compliance");
1292 struct wps_context *wps)
1294 wpa_printf(MSG_DEBUG, "WPS: Set UUID for interface %s", wpa_s->ifname);
1301 if (wps != wpa_s->global->ifaces->wps)
1302 os_memcpy(wps->uuid,
1303 wpa_s->global->ifaces->wps->uuid,
1305 wpa_hexdump(MSG_DEBUG, "WPS: UUID from the first "
1306 "interface", wps->uuid, WPS_UUID_LEN);
1308 uuid_gen_mac_addr(wpa_s->own_addr, wps->uuid);
1309 wpa_hexdump(MSG_DEBUG, "WPS: UUID based on MAC "
1310 "address", wps->uuid, WPS_UUID_LEN);
1313 os_memcpy(wps->uuid, wpa_s->conf->uuid, WPS_UUID_LEN);
1314 wpa_hexdump(MSG_DEBUG, "WPS: UUID based on configuration",
1315 wps->uuid, WPS_UUID_LEN);
1321 struct wps_context *wps)
1323 wpabuf_free(wps->dev.vendor_ext_m1);
1324 wps->dev.vendor_ext_m1 = NULL;
1327 wps->dev.vendor_ext_m1 =
1329 if (!wps->dev.vendor_ext_m1) {
1330 wpa_printf(MSG_ERROR, "WPS: Cannot "
1339 struct wps_context *wps;
1344 wps = os_zalloc(sizeof(*wps));
1345 if (wps == NULL)
1348 wps->cred_cb = wpa_supplicant_wps_cred;
1349 wps->event_cb = wpa_supplicant_wps_event;
1350 wps->rf_band_cb = wpa_supplicant_wps_rf_band;
1351 wps->cb_ctx = wpa_s;
1353 wps->dev.device_name = wpa_s->conf->device_name;
1354 wps->dev.manufacturer = wpa_s->conf->manufacturer;
1355 wps->dev.model_name = wpa_s->conf->model_name;
1356 wps->dev.model_number = wpa_s->conf->model_number;
1357 wps->dev.serial_number = wpa_s->conf->serial_number;
1358 wps->config_methods =
1360 if ((wps->config_methods & (WPS_CONFIG_DISPLAY | WPS_CONFIG_LABEL)) ==
1362 wpa_printf(MSG_ERROR, "WPS: Both Label and Display config "
1364 os_free(wps);
1367 wps->config_methods = wps_fix_config_methods(wps->config_methods);
1368 wps->dev.config_methods = wps->config_methods;
1369 os_memcpy(wps->dev.pri_dev_type, wpa_s->conf->device_type,
1372 wps->dev.num_sec_dev_types = wpa_s->conf->num_sec_device_types;
1373 os_memcpy(wps->dev.sec_dev_type, wpa_s->conf->sec_device_type,
1374 WPS_DEV_TYPE_LEN * wps->dev.num_sec_dev_types);
1376 wpas_wps_set_vendor_ext_m1(wpa_s, wps);
1378 wps->dev.os_version = WPA_GET_BE32(wpa_s->conf->os_version);
1384 wps->dev.rf_bands |= WPS_RF_24GHZ;
1386 wps->dev.rf_bands |= WPS_RF_50GHZ;
1389 if (wps->dev.rf_bands == 0) {
1394 wps->dev.rf_bands = WPS_RF_24GHZ | WPS_RF_50GHZ;
1396 os_memcpy(wps->dev.mac_addr, wpa_s->own_addr, ETH_ALEN);
1397 wpas_wps_set_uuid(wpa_s, wps);
1399 wps->auth_types = WPS_AUTH_WPA2PSK | WPS_AUTH_WPAPSK;
1400 wps->encr_types = WPS_ENCR_AES | WPS_ENCR_TKIP;
1408 wps->registrar = wps_registrar_init(wps, &rcfg);
1409 if (wps->registrar == NULL) {
1410 wpa_printf(MSG_DEBUG, "Failed to initialize WPS Registrar");
1411 os_free(wps);
1415 wpa_s->wps = wps;
1428 if (wpa_s->wps == NULL)
1436 wps_registrar_deinit(wpa_s->wps->registrar);
1437 wpabuf_free(wpa_s->wps->dh_pubkey);
1438 wpabuf_free(wpa_s->wps->dh_privkey);
1439 wpabuf_free(wpa_s->wps->dev.vendor_ext_m1);
1440 os_free(wpa_s->wps->network_key);
1441 os_free(wpa_s->wps);
1442 wpa_s->wps = NULL;
1457 wpa_printf(MSG_DEBUG, " skip - non-WPS AP");
1462 wpa_printf(MSG_DEBUG, " skip - WPS AP "
1469 wpa_printf(MSG_DEBUG, " selected based on WPS IE "
1477 wpa_printf(MSG_DEBUG, " skip - non-WPS AP");
1482 * Start with WPS APs that advertise our address as an
1484 * allow any WPS AP after couple of scans since some APs do not
1490 wpa_printf(MSG_DEBUG, " skip - WPS AP "
1495 wpa_printf(MSG_DEBUG, " selected based on WPS IE");
1497 wpa_printf(MSG_DEBUG, " selected based on WPS IE "
1505 wpa_printf(MSG_DEBUG, " selected based on WPS IE");
1524 /* allow wildcard SSID for WPS PBC */
1532 /* allow wildcard SSID for WPS PIN */
1553 wpa_printf(MSG_DEBUG, "WPS: Mandatory WPS IE "
1582 wpa_printf(MSG_DEBUG, "WPS: Check whether PBC session overlap is "
1590 wpa_hexdump(MSG_DEBUG, "WPS: UUID of the selected BSS",
1593 wpa_printf(MSG_DEBUG, "WPS: Selected BSS does not include "
1594 "WPS IE?!");
1609 wpa_printf(MSG_DEBUG, "WPS: Another BSS in active PBC mode: "
1612 wpa_hexdump(MSG_DEBUG, "WPS: UUID of the other BSS",
1617 wpa_msg(wpa_s, MSG_INFO, "WPS: PBC overlap detected: "
1639 unsigned int pbc = 0, auth = 0, pin = 0, wps = 0;
1656 wps++;
1666 else if (wps)
1707 wpa_s->wps_er = wps_er_init(wpa_s->wps, wpa_s->ifname, filter);
1744 return wps_registrar_add_pin(wpa_s->wps->registrar, addr,
1934 wpa_printf(MSG_DEBUG, "WPS ER: Terminated");
1970 struct wps_context *wps = wpa_s->wps;
1972 if (wps == NULL)
1976 wps->config_methods = wps_config_methods_str2bin(
1978 if ((wps->config_methods &
1981 wpa_printf(MSG_ERROR, "WPS: Both Label and Display "
1984 wps->config_methods &= ~WPS_CONFIG_LABEL;
1987 wps->config_methods = wps_fix_config_methods(wps->config_methods);
1988 wps->dev.config_methods = wps->config_methods;
1991 os_memcpy(wps->dev.pri_dev_type, wpa_s->conf->device_type,
1995 wps->dev.num_sec_dev_types = wpa_s->conf->num_sec_device_types;
1996 os_memcpy(wps->dev.sec_dev_type, wpa_s->conf->sec_device_type,
1997 wps->dev.num_sec_dev_types * WPS_DEV_TYPE_LEN);
2001 wpas_wps_set_vendor_ext_m1(wpa_s, wps);
2004 wps->dev.os_version = WPA_GET_BE32(wpa_s->conf->os_version);
2007 wpas_wps_set_uuid(wpa_s, wps);
2012 wps->dev.device_name = wpa_s->conf->device_name;
2013 wps->dev.manufacturer = wpa_s->conf->manufacturer;
2014 wps->dev.model_name = wpa_s->conf->model_name;
2015 wps->dev.model_number = wpa_s->conf->model_number;
2016 wps->dev.serial_number = wpa_s->conf->serial_number;
2034 ret = wps_er_config_token_from_cred(wpa_s->wps, &cred);
2095 struct wps_context *wps = wpa_s->wps;
2103 dh5_free(wps->dh_ctx);
2104 wpabuf_free(wps->dh_pubkey);
2105 wpabuf_free(wps->dh_privkey);
2106 wps->dh_privkey = wpabuf_dup(wpa_s->conf->wps_nfc_dh_privkey);
2107 wps->dh_pubkey = wpabuf_dup(wpa_s->conf->wps_nfc_dh_pubkey);
2108 if (wps->dh_privkey == NULL || wps->dh_pubkey == NULL) {
2109 wps->dh_ctx = NULL;
2110 wpabuf_free(wps->dh_pubkey);
2111 wps->dh_pubkey = NULL;
2112 wpabuf_free(wps->dh_privkey);
2113 wps->dh_privkey = NULL;
2116 wps->dh_ctx = dh5_init_fixed(wps->dh_privkey, wps->dh_pubkey);
2117 if (wps->dh_ctx == NULL) {
2118 wpabuf_free(wps->dh_pubkey);
2119 wps->dh_pubkey = NULL;
2120 wpabuf_free(wps->dh_privkey);
2121 wps->dh_privkey = NULL;
2147 if (wps_oob_use_cred(wpa_s->wps, attr) < 0)
2153 wpa_printf(MSG_DEBUG, "WPS: Request reconnection with new network "
2169 wpa_printf(MSG_DEBUG, "WPS: Credential indicated "
2188 wpa_s->wps->registrar, attr->oob_dev_password,
2195 const struct wpabuf *wps)
2199 wpa_hexdump_buf(MSG_DEBUG, "WPS: Received NFC tag payload", wps);
2201 if (wps_parse_msg(wps, &attr)) {
2202 wpa_printf(MSG_DEBUG, "WPS: Ignore invalid data from NFC tag");
2214 wpa_printf(MSG_DEBUG, "WPS: Ignore unrecognized NFC tag");
2222 const struct wpabuf *wps = data;
2233 wpa_printf(MSG_DEBUG, "WPS: Could not parse NDEF");
2236 wps = tmp;
2239 ret = wpas_wps_nfc_tag_process(wpa_s, wps);
2275 * Handover Select carrier record for WPS uses the same format as
2320 struct wpabuf *wps;
2323 wps = ndef_parse_wifi(data);
2324 if (wps == NULL)
2326 wpa_printf(MSG_DEBUG, "WPS: Received application/vnd.wfa.wsc "
2328 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: NFC payload", wps);
2329 ret = wpas_wps_nfc_tag_process(wpa_s, wps);
2330 wpabuf_free(wps);
2340 wpa_printf(MSG_DEBUG, "NFC: WPS connection handover reported");
2341 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: Carrier record in request", req);
2342 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: Carrier record in select", sel);
2368 wpa_printf(MSG_DEBUG, "WPS: AP[%d] " MACSTR " type=%d "
2399 struct wpabuf *wps;
2407 wps = wpa_scan_get_vendor_ie_multi(res, WPS_IE_VENDOR_TYPE);
2408 if (wps == NULL)
2411 r = wps_is_addr_authorized(wps, wpa_s->own_addr, 1);
2419 wpabuf_free(wps);
2424 wpa_printf(MSG_DEBUG, "WPS: AP " MACSTR
2446 wpa_printf(MSG_DEBUG, "WPS: AP " MACSTR " type %d added",