/freebsd/contrib/wpa/src/wps/ |
H A D | wps_enrollee.c | 19 static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg) in wps_build_wps_state() argument 22 if (wps->wps->ap) in wps_build_wps_state() 23 state = wps->wps->wps_state; in wps_build_wps_state() 26 wpa_printf(MSG_DEBUG, "WPS: * Wi-Fi Protected Setup State (%d)", in wps_build_wps_state() 35 static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg) in wps_build_e_hash() argument 41 if (random_get_bytes(wps->snonce, 2 * WPS_SECRET_NONCE_LEN) < 0) in wps_build_e_hash() 43 wpa_hexdump(MSG_DEBUG, "WPS: E-S1", wps->snonce, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 44 wpa_hexdump(MSG_DEBUG, "WPS: E-S2", in wps_build_e_hash() 45 wps->snonce + WPS_SECRET_NONCE_LEN, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 47 if (wps->dh_pubkey_e == NULL || wps->dh_pubkey_r == NULL) { in wps_build_e_hash() [all …]
|
H A D | wps_registrar.c | 143 struct wps_context *wps; member 238 wpa_printf(MSG_DEBUG, "WPS: Add authorized MAC " MACSTR, in wps_registrar_add_authorized_mac() 242 wpa_printf(MSG_DEBUG, "WPS: Authorized MAC was " in wps_registrar_add_authorized_mac() 250 wpa_hexdump(MSG_DEBUG, "WPS: Authorized MACs", in wps_registrar_add_authorized_mac() 259 wpa_printf(MSG_DEBUG, "WPS: Remove authorized MAC " MACSTR, in wps_registrar_remove_authorized_mac() 266 wpa_printf(MSG_DEBUG, "WPS: Authorized MAC was not in the " in wps_registrar_remove_authorized_mac() 275 wpa_hexdump(MSG_DEBUG, "WPS: Authorized MACs", in wps_registrar_remove_authorized_mac() 415 wpa_printf(MSG_DEBUG, "WPS: Removing PBC session for " in wps_registrar_remove_pbc_session() 417 wpa_hexdump(MSG_DEBUG, "WPS: Removed UUID-E", in wps_registrar_remove_pbc_session() 438 wpa_printf(MSG_DEBUG, "WPS: Checking active PBC sessions for overlap"); in wps_registrar_pbc_overlap() [all …]
|
H A D | wps_attr_build.c | 21 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg) in wps_build_public_key() argument 25 wpa_printf(MSG_DEBUG, "WPS: * Public Key"); in wps_build_public_key() 26 wpabuf_clear_free(wps->dh_privkey); in wps_build_public_key() 27 wps->dh_privkey = NULL; in wps_build_public_key() 28 if (wps->dev_pw_id != DEV_PW_DEFAULT && wps->wps->dh_privkey && in wps_build_public_key() 29 wps->wps->dh_ctx) { in wps_build_public_key() 30 wpa_printf(MSG_DEBUG, "WPS: Using pre-configured DH keys"); in wps_build_public_key() 31 if (wps->wps->dh_pubkey == NULL) { in wps_build_public_key() 33 "WPS: wps->wps->dh_pubkey == NULL"); in wps_build_public_key() 36 wps->dh_privkey = wpabuf_dup(wps->wps->dh_privkey); in wps_build_public_key() [all …]
|
H A D | wps_common.c | 62 int wps_derive_keys(struct wps_data *wps) in wps_derive_keys() argument 70 if (wps->dh_privkey == NULL) { in wps_derive_keys() 71 wpa_printf(MSG_DEBUG, "WPS: Own DH private key not available"); in wps_derive_keys() 75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys() 77 wpa_printf(MSG_DEBUG, "WPS: Peer DH public key not available"); in wps_derive_keys() 81 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: DH Private Key", wps->dh_privkey); in wps_derive_keys() 82 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH peer Public Key", pubkey); in wps_derive_keys() 83 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); in wps_derive_keys() 84 dh5_free(wps->dh_ctx); in wps_derive_keys() 85 wps->dh_ctx = NULL; in wps_derive_keys() [all …]
|
H A D | wps_er.c | 34 static void wps_er_sta_event(struct wps_context *wps, struct wps_er_sta *sta, in wps_er_sta_event() argument 40 if (wps->event_cb == NULL) in wps_er_sta_event() 55 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_sta_event() 76 wps_er_sta_event(sta->ap->er->wps, sta, WPS_EV_ER_ENROLLEE_REMOVE); in wps_er_sta_free() 77 if (sta->wps) in wps_er_sta_free() 78 wps_deinit(sta->wps); in wps_er_sta_free() 127 static void wps_er_ap_event(struct wps_context *wps, struct wps_er_ap *ap, in wps_er_ap_event() argument 133 if (wps->event_cb == NULL) in wps_er_ap_event() 150 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_ap_event() 183 wpa_printf(MSG_DEBUG, "WPS ER: Unsubscribed from AP %s (%s)", in wps_er_ap_unsubscribed() [all …]
|
H A D | wps_validate.c | 13 #include "wps.h" 25 wpa_printf(MSG_INFO, "WPS-STRICT: Version attribute " in wps_validate_version() 32 wpa_printf(MSG_INFO, "WPS-STRICT: Invalid Version attribute " in wps_validate_version() 44 wpa_printf(MSG_INFO, "WPS-STRICT: Version2 attribute " in wps_validate_version2() 51 wpa_printf(MSG_INFO, "WPS-STRICT: Invalid Version2 attribute " in wps_validate_version2() 63 wpa_printf(MSG_INFO, "WPS-STRICT: Request Type " in wps_validate_request_type() 70 wpa_printf(MSG_INFO, "WPS-STRICT: Invalid Request Type " in wps_validate_request_type() 82 wpa_printf(MSG_INFO, "WPS-STRICT: Response Type " in wps_validate_response_type() 89 wpa_printf(MSG_INFO, "WPS-STRICT: Invalid Response Type " in wps_validate_response_type() 101 wpa_printf(MSG_INFO, "WPS-STRICT: Physical/Virtual " in valid_config_methods() [all …]
|
H A D | wps_attr_parse.c | 23 wpa_printf(MSG_EXCESSIVE, "WPS: WFA subelement id=%u len=%u", in wps_set_vendor_ext_wfa_subelem() 28 wpa_printf(MSG_DEBUG, "WPS: Invalid Version2 length " in wps_set_vendor_ext_wfa_subelem() 40 wpa_printf(MSG_DEBUG, "WPS: Invalid Network Key " in wps_set_vendor_ext_wfa_subelem() 48 wpa_printf(MSG_DEBUG, "WPS: Invalid Request to Enroll " in wps_set_vendor_ext_wfa_subelem() 56 wpa_printf(MSG_DEBUG, "WPS: Invalid Settings Delay " in wps_set_vendor_ext_wfa_subelem() 64 wpa_printf(MSG_DEBUG, "WPS: Invalid Registrar Configuration Methods length %u", in wps_set_vendor_ext_wfa_subelem() 73 "WPS: Invalid Multi-AP Extension length %u", in wps_set_vendor_ext_wfa_subelem() 78 wpa_printf(MSG_DEBUG, "WPS: Multi-AP Extension 0x%02x", in wps_set_vendor_ext_wfa_subelem() 82 wpa_printf(MSG_MSGDUMP, "WPS: Skipped unknown WFA Vendor " in wps_set_vendor_ext_wfa_subelem() 117 wpa_printf(MSG_DEBUG, "WPS: Skip invalid Vendor Extension"); in wps_parse_vendor_ext() [all …]
|
H A D | wps.c | 30 * wps_init - Initialize WPS Registration protocol data 31 * @cfg: WPS configuration 34 * This function is used to initialize WPS data for a registration protocol 44 data->wps = cfg->wps; in wps_init() 47 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 49 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init() 50 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 60 wpa_hexdump_key(MSG_DEBUG, "WPS: AP PIN dev_password", in wps_init() 69 if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) { in wps_init() 75 data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id; in wps_init() [all …]
|
H A D | wps_i.h | 12 #include "wps.h" 18 * struct wps_data - WPS registration protocol data 25 * wps - Pointer to long term WPS context 27 struct wps_context *wps; member 137 int wps_derive_keys(struct wps_data *wps); 138 int wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd, 140 struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr, 142 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, 144 void wps_success_event(struct wps_context *wps, const u8 *mac_addr); 145 void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part, [all …]
|
H A D | wps_attr_process.c | 16 int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator, in wps_process_authenticator() argument 24 wpa_printf(MSG_DEBUG, "WPS: No Authenticator attribute " in wps_process_authenticator() 29 if (wps->last_msg == NULL) { in wps_process_authenticator() 30 wpa_printf(MSG_DEBUG, "WPS: Last message not available for " in wps_process_authenticator() 38 addr[0] = wpabuf_head(wps->last_msg); in wps_process_authenticator() 39 len[0] = wpabuf_len(wps->last_msg); in wps_process_authenticator() 43 if (hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, in wps_process_authenticator() 46 wpa_printf(MSG_DEBUG, "WPS: Incorrect Authenticator"); in wps_process_authenticator() 54 int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg, in wps_process_key_wrap_auth() argument 62 wpa_printf(MSG_DEBUG, "WPS: No KWA in decrypted attribute"); in wps_process_key_wrap_auth() [all …]
|
H A D | wps_dev_attr.c | 19 wpa_printf(MSG_DEBUG, "WPS: * Manufacturer"); in wps_build_manufacturer() 25 * Some deployed WPS implementations fail to parse zero-length in wps_build_manufacturer() 43 wpa_printf(MSG_DEBUG, "WPS: * Model Name"); in wps_build_model_name() 49 * Some deployed WPS implementations fail to parse zero-length in wps_build_model_name() 67 wpa_printf(MSG_DEBUG, "WPS: * Model Number"); in wps_build_model_number() 73 * Some deployed WPS implementations fail to parse zero-length in wps_build_model_number() 91 wpa_printf(MSG_DEBUG, "WPS: * Serial Number"); in wps_build_serial_number() 97 * Some deployed WPS implementations fail to parse zero-length in wps_build_serial_number() 114 wpa_printf(MSG_DEBUG, "WPS: * Primary Device Type"); in wps_build_primary_dev_type() 128 wpa_printf(MSG_DEBUG, "WPS: * Secondary Device Type"); in wps_build_secondary_dev_type() [all …]
|
H A D | wps_upnp_web.c | 2 * UPnP WPS Device - Web connections 42 * WFA WPS specifications. Extra white space has been removed to save space. 195 s = iface->wps->friendly_name; in format_wps_device_xml() 196 s = ((s && *s) ? s : "WPS Access Point"); in format_wps_device_xml() 199 s = iface->wps->dev.manufacturer; in format_wps_device_xml() 203 if (iface->wps->manufacturer_url) in format_wps_device_xml() 205 iface->wps->manufacturer_url); in format_wps_device_xml() 207 if (iface->wps->model_description) in format_wps_device_xml() 209 iface->wps->model_description); in format_wps_device_xml() 211 s = iface->wps->dev.model_name; in format_wps_device_xml() [all …]
|
H A D | wps_upnp.c | 2 * UPnP WPS Device 63 * Description: EAP-WPS UPnP device source 123 * Overview of WPS over UPnP: 132 * is WPS carried via UPnP messages. There is quite a bit of basic UPnP 133 * discovery to do before we can get to WPS, however. 165 * obtained from a probe request or response on Wi-Fi. WPS messages M1-M8 166 * are passed via a POST of a PutMessage; the M1-M8 WPS messages are converted 183 #include "wps.h" 336 wpa_printf(MSG_DEBUG, "WPS UPnP: Reject an unacceptable URL"); in subscr_addr_add_url() 346 wpa_printf(MSG_DEBUG, "WPS UPnP: Adding URL '%s'", scratch_mem); in subscr_addr_add_url() [all …]
|
H A D | wps_upnp_ssdp.c | 2 * UPnP SSDP for WPS 23 #include "wps.h" 133 uuid_bin2str(iface->wps->uuid, uuid_string, sizeof(uuid_string)); in next_advertisement() 219 * @sm: WPS UPnP state machine from upnp_wps_device_init() 248 wpa_printf(MSG_INFO, "WPS UPnP: Advertisement sendto " in advertisement_state_machine_stop() 281 wpa_printf(MSG_MSGDUMP, "WPS UPnP: Advertisement state=%d", a->state); in advertisement_state_machine_handler() 293 wpa_printf(MSG_ERROR, "WPS UPnP: Advertisement sendto failed:" in advertisement_state_machine_handler() 300 wpa_printf(MSG_DEBUG, "WPS UPnP: ADVERTISE_DOWN->UP"); in advertisement_state_machine_handler() 315 wpa_printf(MSG_DEBUG, "WPS UPnP: ADVERTISE_UP (#%u); " in advertisement_state_machine_handler() 332 * @sm: WPS UPnP state machine from upnp_wps_device_init() [all …]
|
H A D | wps.h | 34 * struct wps_credential - WPS Credential 63 /* maximum number of advertised WPS vendor extension attributes */ 65 /* maximum size of WPS Vendor extension attribute */ 67 /* maximum number of parsed WPS vendor extension attributes */ 71 * struct wps_device_data - WPS Device Data 108 * struct wps_config - WPS configuration for a single registration protocol run 112 * wps - Pointer to long term WPS context 114 struct wps_context *wps; member 137 * assoc_wps_ie: (Re)AssocReq WPS IE (in AP; %NULL if not AP) 210 * enum wps_process_res - WPS message processing result [all …]
|
/freebsd/contrib/wpa/src/ap/ |
H A D | wps_hostapd.c | 2 * hostapd / WPS integration 19 #include "wps/wps.h" 20 #include "wps/wps_defs.h" 21 #include "wps/wps_dev_attr.h" 22 #include "wps/wps_attr_parse.h" 32 #include "wps/wps_upnp.h" 34 struct wps_context *wps); 43 static void hostapd_wps_nfc_clear(struct wps_context *wps); 105 "Received new WPA/WPA2-PSK from WPS for STA " MACSTR, in hostapd_wps_new_psk_cb() 109 "Received new WPA/WPA2-PSK from WPS for STA " MACSTR in hostapd_wps_new_psk_cb() [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/ |
H A D | README-WPS | 1 wpa_supplicant and Wi-Fi Protected Setup (WPS) 4 This document describes how the WPS implementation in wpa_supplicant 6 management GUI) is used to enable WPS enrollment and registrar 10 Introduction to WPS 13 Wi-Fi Protected Setup (WPS) is a mechanism for easy configuration of a 16 devices. WPS includes number of methods for setting up connections 20 While WPS can enable more home networks to use encryption in the 23 not very secure. As such, use of WPS may not be suitable for 27 WPS uses the following terms to describe the entities participating 38 when WPS is used to configure the access point. [all …]
|
H A D | wps_supplicant.c | 2 * wpa_supplicant / WPS integration 24 #include "wps/wps_attr_parse.h" 43 * The minimum time in seconds before trying to associate to a WPS PIN AP that 68 wpa_printf(MSG_DEBUG, "WPS: Continuing association after eapol_cb"); in wpas_wps_assoc_with_cred() 84 /* Return the latest receive WPS IE from the AP regardless of whether in wpas_wps_get_wps_ie() 106 wpa_printf(MSG_DEBUG, "WPS: PIN registration with " MACSTR in wpas_wps_eapol_cb() 133 wpa_printf(MSG_DEBUG, "WPS: Network configuration replaced - " in wpas_wps_eapol_cb() 140 wpa_printf(MSG_DEBUG, "WPS: Current network is " in wpas_wps_eapol_cb() 149 wpa_printf(MSG_DEBUG, "WPS: Checking whether fast association " in wpas_wps_eapol_cb() 153 struct wpabuf *wps; in wpas_wps_eapol_cb() local [all …]
|
/freebsd/contrib/wpa/hostapd/ |
H A D | README-WPS | 1 hostapd and Wi-Fi Protected Setup (WPS) 4 This document describes how the WPS implementation in hostapd can be 9 Introduction to WPS 12 Wi-Fi Protected Setup (WPS) is a mechanism for easy configuration of a 15 devices. WPS includes number of methods for setting up connections 19 While WPS can enable more home networks to use encryption in the 22 not very secure. As such, use of WPS may not be suitable for 26 WPS uses following terms to describe the entities participating in the 37 when WPS is used to configure the access point. 40 More information about WPS is available from Wi-Fi Alliance: [all …]
|
H A D | hostapd.wpa_psk | 10 # An optional WPS tag can be added by prefixing the line with 11 # wps=<0/1> (default: 0). Any matching entry with that tag will be used when 12 # generating a PSK for a WPS Enrollee instead of generating a new random 19 wps=1 00:00:00:00:00:00 passphrase for WPS 20 wps=1 11:22:33:44:55:00 dev-specific passphrase for WPS
|
H A D | README-MULTI-AP | 25 - the WPS onboarding process; 95 with WPS support on the backhaul BSS (multi_ap=1). hostapd does not check for 98 1. Backhaul BSS beacons do not advertise WPS support (other than that, nothing 107 WPS support 110 WPS requires more special handling. WPS must only be advertised on fronthaul 111 BSSs, not on backhaul BSSs, so WPS should not be enabled on a backhaul-only 112 BSS in hostapd.conf. The WPS configuration purely works on the fronthaul BSS. 113 When a WPS M1 message has an additional subelement that indicates a request for 120 When these are set on an BSS with WPS, they are used instead of the normal 121 credentials when hostapd receives a WPS M1 message with the Multi-AP IE. Only [all …]
|
/freebsd/contrib/wpa/src/common/ |
H A D | wpa_ctrl.h | 150 /** WPS overlap detected in PBC mode */ 151 #define WPS_EVENT_OVERLAP "WPS-OVERLAP-DETECTED " 152 /** Available WPS AP with active PBC found in scan results */ 153 #define WPS_EVENT_AP_AVAILABLE_PBC "WPS-AP-AVAILABLE-PBC " 154 /** Available WPS AP with our address as authorized in scan results */ 155 #define WPS_EVENT_AP_AVAILABLE_AUTH "WPS-AP-AVAILABLE-AUTH " 156 /** Available WPS AP with recently selected PIN registrar found in scan results 158 #define WPS_EVENT_AP_AVAILABLE_PIN "WPS-AP-AVAILABLE-PIN " 159 /** Available WPS AP found in scan results */ 160 #define WPS_EVENT_AP_AVAILABLE "WPS-AP-AVAILABLE " [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/examples/ |
H A D | wps-nfc.py | 3 # Example nfcpy to wpa_supplicant wrapper for WPS NFC operations 110 ret = wpas.request("NFC_GET_HANDOVER_REQ NDEF WPS-CR") 121 res = wpas.request("NFC_GET_HANDOVER_SEL NDEF WPS-CR").rstrip() 123 res = wpas.request("NFC_GET_HANDOVER_SEL NDEF WPS-CR " + uuid).rstrip() 133 return wpas.request("NFC_REPORT_HANDOVER " + type + " WPS " + 175 summary("WPS carrier type match - add WPS carrier record") 204 summary("Trying to initiate WPS handover") 272 print("WPS carrier type match - send to wpa_supplicant") 301 summary("WPS tag - send to wpa_supplicant") 333 print("Write WPS config token") [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/dbus/ |
H A D | dbus_new_handlers_wps.c | 2 * WPA Supplicant / dbus-based control interface (WPS) 45 "dbus: WPS.Start - Wrong Role type, string required"); in wpas_dbus_handler_wps_role() 56 wpa_printf(MSG_DEBUG, "dbus: WPS.Start - Unknown role %s", val); in wpas_dbus_handler_wps_role() 75 "dbus: WPS.Start - Wrong Type type, string required"); in wpas_dbus_handler_wps_type() 86 wpa_printf(MSG_DEBUG, "dbus: WPS.Start - Unknown type %s", in wpas_dbus_handler_wps_type() 108 "dbus: WPS.Start - Wrong Bssid type, byte array required"); in wpas_dbus_handler_wps_bssid() 116 wpa_printf(MSG_DEBUG, "dbus: WPS.Start - Wrong Bssid length %d", in wpas_dbus_handler_wps_bssid() 136 "dbus: WPS.Start - Wrong Pin type, string required"); in wpas_dbus_handler_wps_pin() 160 "dbus: WPS.Start - Wrong P2PDeviceAddress type, byte array required"); in wpas_dbus_handler_wps_p2p_dev_addr() 170 "dbus: WPS.Start - Wrong P2PDeviceAddress length %d", in wpas_dbus_handler_wps_p2p_dev_addr() [all …]
|
/freebsd/contrib/wpa/src/eap_peer/ |
H A D | eap_wsc.c | 15 #include "wps/wps.h" 16 #include "wps/wps_defs.h" 27 struct wps_data *wps; member 147 struct wps_context *wps; in eap_wsc_init() local 153 wps = sm->wps; in eap_wsc_init() 154 if (wps == NULL) { in eap_wsc_init() 155 wpa_printf(MSG_ERROR, "EAP-WSC: WPS context not available"); in eap_wsc_init() 178 data->wps_ctx = wps; in eap_wsc_init() 181 cfg.wps = wps; in eap_wsc_init() 254 "WPS"); in eap_wsc_init() [all …]
|