aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps/wps.h
Commit message (Collapse)AuthorAgeFilesLines
* Move p2p_connect PIN format validation into a separate functionJouni Malinen2012-06-301-0/+1
| | | | | | | | | This functionality could be shared for other commands, too, so move it to a common function. In addition, implement the validation in a bit more strict way to avoid accepting values like '-123' as a valid PIN. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Share a single function for generating NFS password tokensJouni Malinen2012-06-281-0/+3
| | | | | | | There is no need for both hostapd and wpa_supplicant to have their own functions for this. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add support for NCF password token from APJouni Malinen2012-06-281-0/+5
| | | | | | | | | | | | | | | | The new hostapd ctrl_iface command WPS_NFC_TOKEN can now be used to manage AP-as-Enrollee operations with NFC password token. WPS/NDEF parameters to this command can be used to generate a new NFC password token. enable/disable parameters can be used to enable/disable use of NFC password token (instead of AP PIN) for external Registrars. A preconfigured NFS password token can be used by providing its parameters with new hostapd.conf fields wps_nfc_dev_pw_id, wps_nfc_dh_pubkey, wps_nfc_dh_privkey, and wps_nfc_dev_pw. This use will also depend on WPS_NFC_TOKEN enable/disable commands, i.e., the configured NFS password token is disabled by default. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS ER: Add support for building NFC configuration tokenJouni Malinen2012-06-281-0/+1
| | | | | | | | WPS_ER_NFC_CONFIG_TOKEN command can now be used to build a NFC configuration token based on AP Settings learnt with WPS_ER_LEARN or set with WPS_ER_CONFIG. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add support for NFC configuration token from external programJouni Malinen2012-06-281-0/+2
| | | | | | | | The new wpa_supplicant ctrl_iface command WPS_NFC_TAG_READ can now be used to process NFC tags read by external programs to initiate wpa_supplicant to use NFC Configuration Token to create a new network. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add new mechanism for generation NFC configuration tokenJouni Malinen2012-06-281-0/+1
| | | | | | | | The new hostapd ctrl_iface command WPS_NFC_CONFIG_TOKEN can now be used to fetch payload for an NFC configuration token so that an external program can be used to write this on an NFC tag. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use separate list of NFC Password Tokens in the RegistrarJouni Malinen2012-06-271-0/+3
| | | | | | | | | | This adds a cleaner mechanism for handling NFC Password Tokens in the WPS Registrar. There could be more than one active NFC Password Token in use and as such, a list of tokens needs to be maintained. The old WPS_OOB interface is still using the old mechanism that supports only a single active NFC Password Token. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add new mechanism for communicating NFC tag read eventsJouni Malinen2012-06-271-1/+4
| | | | | | | | | | | hostapd ctrl_iface can now be used to deliver payload from read operation of an NFC tag. This allows operations without having to have low-level NFC code within hostapd. For now, the new wps_nfc_tag_read command can be used with NFC password tokens for the case where the AP has an NFC device that is used to read an NFC tag from the station Enrollee. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add new mechanism for NFC config method using password tokenJouni Malinen2012-06-271-0/+3
| | | | | | | | | | | | Instead of requiring low-level access to an NFC device and synchronous operations, the new WPS_NFC_TOKEN and WPS_NFC ctrl_iface commands can be used to build a NFC password token and initiate WPS protocol run using that token (or pre-configured values) as separate commands. The WPS_NFC_TOKEN output can be written to a NFC tag using an external program, i.e., wpa_supplicant does not need to have low-level code for NFC operations for this. Signed-hostap: Jouni Malinen <j@w1.fi>
* NDEF: Mark input data const when it is not modifiedJouni Malinen2012-06-271-2/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Allow NDEF functions to be used from outside src/wpsJouni Malinen2012-06-271-0/+4
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Allow vendor specific attribute to be added into M1Anirban Sirkhell2012-04-041-0/+1
| | | | | | | | wps_vendor_ext_m1 configuration parameter can now be used to add a vendor specific attribute into the WPS M1 message, e.g., for Windows Vertical Pairing. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Invalidate wildcard PIN on other radios after successful useJouni Malinen2012-02-291-2/+6
| | | | | | | | If a wildcard PIN is used on any of the radios that hostapd is controlling, invalidate the matching PIN on all the other radios to avoid multiple uses of the same PIN. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Advertise immediate availability of WPS credentialJouni Malinen2012-02-271-1/+1
| | | | | | | | | | | | | | Use Device Password ID in WSC IE of Probe Request and Probe Response frames to advertise immediate availability of WPS credentials per P2P specification sections 3.1.2.1.1 (Listen State), 3.1.2.1.2 (Scan Phase), and 3.1.2.1.3 (Find Phase). For now, the Device Password ID is set only for the case where we are active GO Negotiation with a specific peer. In practice, this means that the Probe Response frames during pending GO Negotiation (whenever in Listen state) indicate availability of the credential. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Disable AP PIN after 10 consecutive failuresJouni Malinen2012-01-301-1/+6
| | | | | | | | | | | While the exponential increase in the lockout period provides an efficient mitigation mechanism against brute force attacks, this additional trigger to enter indefinite lockout period (cleared by restarting hostapd) will limit attacks even further by giving maximum of 10 attempts (without authorized user action) even in a very long term attack. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Fix stopping of active WPS operation on dual concurrent APSubrat Dash2011-11-301-0/+1
| | | | | | | | | | When hostapd controls multiple radios, WPS operations are started on all interfaces. However, when the provisioning run had been completed successfully, actiove WPS mode was stopped only a single interface. Fix this to iterate through all interfaces so that this is handled consistently with the starting of WPS operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Send AP Settings as a wrapped Credential attribute to ctrl_ifaceZhi Chen2011-09-301-0/+3
| | | | | | Wrap self-generated WPS credential for new AP settings and send that to control interface to provide the needed information in WPS-NEW-AP-SETTINGS for external processing.
* WPS: Set Probe Request config methods based on configurationBharat Chakravarty2011-09-011-0/+1
| | | | | | Instead of hardcoding the Config Methods attribute value in Probe Request frames, set this based on the configured parameter config_methods to allow correct set of methods to be advertised.
* WPS: Wait for EAPOL-Start unless WPS 2.0 station as workaroundJouni Malinen2011-08-281-0/+1
| | | | | | | | | | | Extend the code that waits for the station to send EAPOL-Start before initiating EAPOL authenticator operations to cover the case where the station includes WPS IE in (Re)Association Request frame if that IE does not include support for WPS 2.0. While this should not really be needed, this may help with some deployed WPS 1.0 stations that do not support EAPOL operations correctly and may get confused of the EAP-Request/Identity packets that would show up twice if EAPOL-Start is transmitted.
* WPS: Add a workaround for Windows 7 capability discovery for PBCJouni Malinen2011-05-171-0/+8
| | | | | | | | | | | | Windows 7 uses incorrect way of figuring out AP's WPS capabilities by acting as a Registrar and using M1 from the AP. The config methods attribute in that message is supposed to indicate only the configuration method supported by the AP in Enrollee role, i.e., to add an external Registrar. For that case, PBC shall not be used and as such, the PushButton config method is removed from M1 by default. If pbc_in_m1=1 is included in the configuration file, the PushButton config method is left in M1 (if included in config_methods parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from a label in the AP).
* P2P: Add option for requested device type in P2P search/scanJean-Michel Bachot2011-03-191-1/+3
| | | | | | | With this, p2p_find can be extended to find certain requested device types. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* P2P: Keep track of peer WPS vendor extensionsJean-Michel Bachot2011-03-191-0/+4
| | | | | | | | Make the P2P code keep track of WPS vendor extensions received from peers so they can be exposed via DBus later. Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* WPS: Add support for adding WPS Vendor ExtensionsJean-Michel Bachot2011-03-191-0/+3
| | | | | | | This adds the ability to add WPS vendor extensions to an AP (or GO). They will be added to the WSC IE(s) in Beacon and Probe Response frames. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* P2P: Keep track of secondary device types for peersJean-Michel Bachot2011-03-171-0/+1
| | | | | Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* WPS: Add secondary device types into Probe Request framesJean-Michel Bachot2011-03-171-0/+5
| | | | | | | The secondary device type list is an optional attribute in the WSC IE. Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* P2P: Allow WPS_PBC command on GO to select on P2P Device AddressJouni Malinen2011-02-071-1/+12
| | | | | | | | | | | | | | An optional parameter, p2p_dev_addr, can now be given to WPS_PBC command on P2P GO to indicate that only the P2P device with the specified P2P Device Address is allowed to connect using PBC. If any other device tries to use PBC, a session overlap is indicated and the negotiation is rejected with M2D. The command format for specifying the address is "WPS_PBC p2p_dev_addr=<address>", e.g., WPS_PBC p2p_dev_addr=02:03:04:05:06:07 In addition, show the PBC session overlap indication as a WPS failure event on an AP/GO interface. This particular new case shows up as "WPS-FAIL msg=4 config_error=12".
* WPS: Add mechanism for indicating non-standard WPS errorsChao-Wen Yang2011-01-131-0/+1
| | | | | | | | | | | Previously, only the Configuration Error values were indicated in WPS-FAIL events. Since those values are defined in the specification it is not feasible to extend them for indicating other errors. Add a new error indication value that is internal to wpa_supplicant and hostapd to allow other errors to be indicated. Use the new mechanism to indicate if negotiation fails because of WEP or TKIP-only configurations being disallows by WPS 2.0.
* WPS ER: Show SetSelectedRegistrar events as ctrl_iface eventsJouni Malinen2010-10-251-1/+18
| | | | | This makes it easier to figure out if something goes wrong in preparing the AP for enrolling a station.
* hostapd: Add wps_config ctrl_interface command for configuring APJouni Malinen2010-10-211-0/+2
| | | | | | This command can be used to configure the AP using the internal WPS registrar. It works in the same way as new AP settings received from an ER.
* WPS ER: Add wps_er_set_config to use local configurationJouni Malinen2010-10-201-0/+2
| | | | | | This command can be used to enroll a network based on a local network configuration block instead of having to (re-)learn the current AP settings with wps_er_learn.
* WPS: Add Config Error into WPS-FAIL eventsJouni Malinen2010-10-141-0/+1
| | | | | | This makes it easier to figure out what could have failed in the WPS protocol and potentially provide more information for the user on how to resolve the issue.
* WPS: Fix strict validation of encrypted data for WSC 2.0-only caseJouni Malinen2010-09-221-10/+12
| | | | | | | Need to figure out whether the message is from a WSC 2.0 -based device based on the unencrypted attributes, not the contents of the encrypted data since the Version2 subelement is only included in the unencrypted area.
* WPS: Add MAC address to validation error message for Probe RequestJouni Malinen2010-09-221-2/+3
| | | | | This makes it easier to figure out which device is sending invalid Probe Request frames.
* WPS: Fix Beacon WPS IE on concurrent dualband AP in PBC modeJouni Malinen2010-09-201-0/+5
| | | | | | The Beacon frame must include UUID-E and RF Bands attributes when in active PBC mode to allow stations to figure out that two BSSes in PBC mode is not a PBC session overlap.
* WPS: Add BSSID to strict validation error messagesJouni Malinen2010-09-201-2/+3
| | | | | This makes it easier to figure out which AP is sending invalid Beacon or Probe Response frames.
* WPS: Allow pending WPS operation to be cancelledArdong Chen2010-09-101-0/+1
| | | | | | | A new ctrl_interface command, WPS_CANCEL, can now be used to cancel a pending or ongoing WPS operation. For now, this is only available with wpa_supplicant (either in station or AP mode). Similar functionality should be added for hostapd, too.
* P2P: Set Device Password ID in WPS M1/M2 per new rulesJouni Malinen2010-09-091-0/+5
| | | | | If the P2P client (WPS Enrollee) uses a PIN from the GO (Registrar), Device Password ID in M1 & M2 is set to Registrar-specified.
* P2P: Do no process Probe Request with P2P wildcard SSID in WPSJouni Malinen2010-09-091-1/+2
| | | | | The Probe Request frames used in P2P Device Discovery should not be processed by the WPS implementation.
* P2P: Add Device Name into WPS IE in Probe Request framesJouni Malinen2010-09-091-0/+3
|
* WPS 2.0: Add strict validation of SetSelectedRegistrar attributesJouni Malinen2010-09-091-0/+7
|
* WPS 2.0: Validate WPS attributes in management frames and WSC messagesJouni Malinen2010-09-091-0/+135
| | | | | | | | If CONFIG_WPS_STRICT is set, validate WPS IE(s) in management frames and reject the frames if any of the mandatory attributes is missing or if an included attribute uses an invalid value. In addition, verify that all mandatory attributes are included and have valid values in the WSC messages.
* WPS 2.0: Add support for AuthorizedMACs attributeJouni Malinen2010-09-091-2/+5
| | | | | | | | | | Advertize list of authorized enrollee MAC addresses in Beacon and Probe Response frames and use these when selecting the AP. In order to provide the list, the enrollee MAC address should be specified whenever adding a new PIN. In addition, add UUID-R into SetSelectedRegistrar action to make it potentially easier for an AP to figure out which ER sent the action should there be multiple ERs using the same IP address.
* WPS: Use different scan result sorting rules when doing WPS provisioningJouni Malinen2010-06-111-0/+2
| | | | | | | | | The AP configuration may change after provisioning, so it is better not to use the current security policy to prioritize results. Instead, use WPS Selected Registrar attribute as the main sorting key and use signal strength next without considering security policy or rate sets. The non-WPS provisioning case remains as-is, i.e., this change applies only when trying to find an AP for WPS provisioning.
* WPS ER: Add command for configuring an APJouni Malinen2010-05-281-0/+2
| | | | | | wps_er_config can now be used to configure an AP. It is similar to wps_er_learn, but instead of only learning the current AP settings, it continues to send M8 with the new settings for the AP.
* WPS ER: Add ctrl_iface event for learned AP settingsJouni Malinen2010-05-271-1/+11
|
* WPS ER: Allow AP filtering based on IP addressJouni Malinen2010-05-271-1/+2
| | | | | | | wps_er_start command now takes an optional parameter that can be used to configure a filter to only allow UPnP SSDP messages from the specified IP address. In practice, this limits the WPS ER operations to a single AP and filters out all other devices in the network.
* Add WPS IE into (Re)Association Response frame if WPS is usedJouni Malinen2010-05-261-0/+1
| | | | | | If the associating station indicates that it is intents to use WPS by including WPS IE in (Re)Association Request frame, include WPS IE in (Re)Association Response frame.
* WPS: Add Enrollee-seen event message and wpa_gui-qt4 Peers entryJouni Malinen2009-12-281-0/+16
| | | | | This can be used to show active Enrollees in AP mode to make it easier to provision a new device.
* Merge driver ops set_wps_beacon_ie and set_wps_probe_resp_ieJouni Malinen2009-12-241-5/+4
| | | | | | | set_ap_wps_ie() is not used to set WPS IE for both Beacon and Probe Response frames with a single call. In addition, struct wpabuf is used instead of separate u8* and length fields. This avoids duplicated allocation of the IEs and simplifies code in general.