aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
Commit message (Collapse)AuthorAgeFilesLines
* Improved 'make install' (use BINDIR/LIBDIR, install shared objects)Daniel Mierswa2009-02-151-0/+3
| | | | (cherry picked from commit d94d4bafbb43699d323d6f6e3e404000b3f0a7b4)
* WPS: Set correct Selected Registrar Config Methods attributeMasashi Honma2009-02-151-0/+1
| | | | | | | | I tried PBC with the hostapd registrar. I pushed the button with "hostap_cli WPS_PBC". But hostapd registrar always sends Selected Registrar Config Methods attribute=0x0000 in beacon/probe response. (cherry picked from commit 363a9e2434c00e06b76d1ec1add434a4a8fd970f)
* Use os_strlcpy instead of os_strncpy when copying ifnameJouni Malinen2009-02-151-2/+2
| | | | | | In theory, the ifname could be IFNAMSIZ characters long and there would not be room for null termination. (cherry picked from commit a3bfd14de1b9e7a89c0b610b0368d2dd7568d315)
* UPnP: Renamed PutWLANResponse callback function to match actionJouni Malinen2009-02-082-5/+5
| | | | | No point in adding extra "event_" to the name. (cherry picked from commit d0184cb25c30a123bb73492f894840f879764164)
* WPS UPnP: Added support for multiple external RegistrarsJouni Malinen2009-02-086-20/+102
| | | | | | | Allow more than one pending PutWLANMessage data to be stored (M2/M2D from multiple external Registrars) and drop pending M2/M2D messages when the Enrollee replies with M3. (cherry picked from commit 915c1ba3c575c32b9d31453b1a55b1a966f622bd)
* WPS UPnP: Add IP address and port details into debug messagesJouni Malinen2009-02-083-16/+28
| | | | | | This makes it much easier to debug operations with multiple external Registrars. (cherry picked from commit 745f8b664d96cbe27539668a3655bd416e3c964f)
* WPS: Allow minor version differences in Version attribute checkJouni Malinen2009-02-081-1/+2
| | | | | | | | Version attribute processing details are not described in the WPS spec, but it is safer to allow minor version to change and only refuse to process the message if major version is different from ours. This matches with the behavior used in the Intel reference implementation. (cherry picked from commit b93b6004e43931c189ce867613ba4237fb7ade2c)
* WPS: Moved Version attribute validation into a shared functionJouni Malinen2009-02-083-11/+19
| | | | (cherry picked from commit f65cbff3a337888cd11a6fc1748709172c98b744)
* UPnP: Removed shadowed variableJouni Malinen2009-02-081-2/+2
| | | | (cherry picked from commit fda90ab4b73b19d4638e8b7cd4c90458e51f9e3e)
* WPS: Set correct Device Password ID in M2Andriy Tkachuk2009-02-081-1/+1
| | | | | | | It looks like we don't set correspondent Device Password ID attribute in M2 message during PBC registration. Without it TG185n STA was not able to connect to our AP in PBC mode. Attached patch fixes this. (cherry picked from commit 25e31cccbe55c2b87d7496326f834e0d0cc0b23d)
* UPnP: Minor coding style cleanupJouni Malinen2009-02-084-11/+10
| | | | (cherry picked from commit e80e5163f8b53f20f816f0d06d618f54ce3d79aa)
* WPS: Add support for external Registrars using UPnP transportJouni Malinen2009-02-0812-5/+5886
| | | | | | | | | | | | | | This adds mostly feature complete external Registrar support with the main missing part being proper support for multiple external Registrars working at the same time and processing of concurrent registrations when using an external Registrar. This code is based on Sony/Saice implementation (https://www.saice-wpsnfc.bz/) and the changes made by Ted Merrill (Atheros) to make it more suitable for hostapd design and embedded systems. Some of the UPnP code is based on Intel's libupnp. Copyrights and licensing are explained in src/wps/wps_upnp.c in more detail. (cherry picked from commit f620268f13dd26c3a3f4ef5509d7d17c0f322a7d)
* Fixed WPS Authenticator attribute processing after M2DJouni Malinen2009-02-081-1/+8
| | | | | | | | We must not replace M1 with M2D as the last_msg since we need M1 to validate a possible M2 after M2D. Since M2D and ACK/NACK replies do not include Authenticator attribute, we can just ignore M2D as far as updating last_msg is concerned. (cherry picked from commit 39034ce80f45110f0311aa80ca9dd62d2083ed76)
* WPS: Add a workaround for incorrect passphrase encoding in Network KeyJouni Malinen2009-02-081-0/+21
| | | | | | | External Registrar in Vista may include NULL termination in the Network Key when encoding an ASCII passphrase for WPA/WPA2-PSK. As a workaround, remove this extra octet if present. (cherry picked from commit 1a5a04c3de054dab90d0604256e540778ddbf099)
* WPS: Lock AP Setup on multiple AP PIN validation failuresJouni Malinen2009-02-085-1/+37
| | | | | | | If a Registrar tries to configure the AP, but fails to validate the device password (AP PIN), lock the AP setup after four failures. This protects the AP PIN against brute force guessing attacks. (cherry picked from commit 3b2cf800afaaf4eec53a237541ec08bebc4c1a0c)
* Added ap_settings option for overriding WPS AP Settings in M7Jouni Malinen2009-02-082-8/+33
| | | | | | | This optional configuration parameter can be used to override AP Settings attributes in M7 similarly to extra_cred option for Credential attribute(s) in M8. (cherry picked from commit 4c29cae9320ccc6675b59f41dddf652b997fdc71)
* WPS: Pad DH Public Key and Shared Key to 192 octetsJouni Malinen2009-02-082-0/+2
| | | | | | | | | | | WPS spec is not very specific on the presentation used for the DH values. The Public Key attribute is described to be 192 octets long, so that could be interpreted to imply that other places use fixed length presentation for the DH keys. Change the DH derivation to use fixed length bufferd by zero padding them from beginning if needed. This can resolve infrequent (about 1/256 chance for both Public Key and Shared Key being shorter) interop issues. (cherry picked from commit b3ddab21223455c147bb18334745eddc5773b487)
* Use WPS state Not Configured instead of Configured in EnrolleeMasashi Honma2009-02-081-1/+1
| | | | | | | | | | This is needed to allow external Registrar (at least the implementation in Windows Vista) to configure the Enrollee. With this patch and my previous patch (for wps.c) , I could pass "Wi-Fi WPS Test Plan Version 1.0 [5.1.4. Add to AP using PIN Config method and PASS PHRASE through wired external registrar]". (cherry picked from commit 96fa129da9f742e76fe0bf9febfeb0ba3042b5c5)
* WPS: Check Device Password ID attribute only if present in AP searchMasashi Honma2009-02-081-4/+8
| | | | | | | | | | | | | | | | | | I can't pass the "Wi-Fi WPS Test Plan Version 1.0 [5.1.4. Add to AP using PIN Config method and PASS PHRASE through wired external registrar]". The wpa_supplicant-0.6.7 can't recoginize the testbed AP(BCM94704AGRRev-E.2.4) as WPS PIN AP. Because after PIN entered, the AP sends Selected Registrar attribute=0 and not send Device Password ID attribute. The proposed change as-is removed validation of Selected Registrar attribute completely. However, that part is not included in this commit since it can cause problems for environments with multiple WPS-enabled APs. Another workaround for this will be considered in wpa_supplicant scanning process (e.g., start trying to use WPS with APs that do not set Selected Registrar to TRUE after couple of scan runs that do not find any APs with Selected Registrar TRUE). (cherry picked from commit e29bcf9eab020e4bd9aae87a7b9602264d228f49)
* WPS: Added option to disable AP auto-config on first registrationJouni Malinen2009-02-082-2/+44
| | | | | | | | | | This operation can now be moved into an external program by configuring hostapd with wps_cred_processing=1 and skip_cred_build=1. A new ctrl_iface message (WPS-REG-SUCCESS <Enrollee MAC addr> <UUID-E>) will be used to notify external programs of each successful registration and that can be used as a tricker to move from unconfigured to configured state. (cherry picked from commit aabe26a136459ca8d6e0926a0bcd85835ddafc9a)
* Changed Credential MAC Address to be BSSID in AP/RegistrarJouni Malinen2009-02-081-2/+4
| | | | | | WPS spec is not very clear on which MAC address is used here, but BSSID makes more sense than Enrollee MAC address. (cherry picked from commit 05bf32cc8763761248144fe476c6e8894f3aa1df)
* WPS: Provide the unparsed Credential attribute to cred_cb()Jouni Malinen2009-02-082-4/+18
| | | | | | | This makes it easier to pass the credential data to external programs (e.g., Network Manager) for processing. The actual use of this data is not yet included in hostapd/wpa_supplicant. (cherry picked from commit eca6e0a9a586b999ff9a51315cd741650997366f)
* Changed the Network Index value to 1 since that is the default valueJouni Malinen2009-02-081-1/+1
| | | | (cherry picked from commit 655e4666005a2054d4c20ea6f18b88b99c7b9b9b)
* Added an option to add (or override) Credential attribute(s) in M8Jouni Malinen2009-02-082-0/+47
| | | | (cherry picked from commit 6fa68a0ee550c6659ff426290ecdee4d425155b1)
* Completed Doxygen documentation for functions declared in wps/wps.hJouni Malinen2009-01-041-7/+54
|
* Mark functions static if not used elsewhere and use proper prototypesJouni Malinen2009-01-031-2/+2
|
* Removed registrar pointer from wps_config and wps_dataJouni Malinen2009-01-034-23/+22
| | | | | wps_context::registrar can be used as the only location for this pointer.
* Removed duplicated authenticator yes/no from wps_config and wps_dataJouni Malinen2009-01-035-21/+8
| | | | | wps_context::ap is available for this purpose and there is no need to change between AP and not AP between protocol runs.
* Removed unused WPS_PENDING processing resultJouni Malinen2009-01-031-6/+1
|
* Added Doxygen documentation for WPS codeJouni Malinen2009-01-035-33/+384
|
* WPS: Cleanup UUID and MAC address configurationJouni Malinen2009-01-013-8/+5
| | | | | No need to configure these separately for each Enrollee in wps_config since wps_context is now used both for Registrar and Enrollee.
* WPS: As a workaround, pad zero-length device attributesJouni Malinen2008-12-251-10/+60
| | | | | | | Some deployed WPS implementations fail to parse zero-length attributes. As a workaround, send a null character if the device attribute string is empty. This allows default values (empty strings) to be used without interop issues.
* WPS: Do not use Selected Registrar Config Methods from scan resultsAndriy Tkachuk2008-12-251-6/+15
| | | | | | | | Before this change, it looked like an AP that was using wsccmd did not get activated since wsccmd left the Selected Registrar Config Methods attribute to be zero. Since Device Password ID can be used to distinguish PBC from any other method, use only it to figure out whether PBC or PIN method is active.
* WPS: Added event callback for successfully completed registrationJouni Malinen2008-12-195-2/+21
|
* WPS: Added callback for failure-after-M2/M2DJouni Malinen2008-12-195-2/+75
| | | | | | This callback is now used to stop wpa_supplicant from trying to continue using parameters (most likely, device password) that do not work in a loop. In addition, wpa_gui can now notify user of failed registration.
* WPS: Added event callback and M2D notificationJouni Malinen2008-12-182-4/+51
| | | | | | The event callback will be used for various event messages and the M2D notification is the first such message. It is used to notify wpa_gui about Registrar not yet knowing the device password (PIN).
* WPS: Improved error processing to use NACK correctlyJouni Malinen2008-12-163-39/+108
| | | | | | Instead of sending out EAP-Failure on errors (on AP) or stopping (on Supplicant), send a NACK message based on the allowed EAP state machine transitions for EAP-WSC.
* Workaround number of compiler warnings with newer MinGW versionJouni Malinen2008-12-101-1/+1
|
* WPS: Added support for wildcard PINs that work with any UUID-EJouni Malinen2008-11-301-17/+43
| | | | | | | Since the Registrar may not yet know the UUID-E when a new PIN is entered, use of a wildcard PIN that works with any UUID-E can be useful. Such a PIN will be bound to the first Enrollee trying to use it and it will be invalidated after the first use.
* WPS: Added more verbose debug info on authentication type mismatchJouni Malinen2008-11-301-1/+2
|
* WPS: Added support for fragmented WPS IE in Beacon and Probe ResponseJouni Malinen2008-11-293-27/+50
| | | | | | | | Fragment WPS IE if needed to fit into the IE length limits in hostapd and Reassemble WPS IE data from multiple IEs in wpa_supplicant. In addition, moved WPS code from events.c into wps_supplicant.c to clean up module interfaces.
* WPS: Added helper functions for generating and validating PINsJouni Malinen2008-11-292-0/+55
|
* WPS: Set Request Type properly into WPS IE in ProbeReq/AssocReqJouni Malinen2008-11-292-6/+6
|
* WPS: Moved WPS IE building for ProbeReq/AssocReq into wps.cJouni Malinen2008-11-293-90/+88
| | | | | | These functions fit in better with the category of functions included in wps.c. wps_common.c is now used for generic helper functions (currently, only crypto code).
* WPS: Split wps_common.c into partsJouni Malinen2008-11-295-937/+1002
| | | | | To make it easier to find various functions, attribute functions were split into wps_attr_{build,parse,process}.c.
* WPS: Moved RF Bands processing into wps_dev_attr.cJouni Malinen2008-11-297-30/+34
| | | | This allows the RF Bands attribute to be configured and stored.
* WPS: Moved ProbeReq/AssocReq WPS IE building into wps_common.cJouni Malinen2008-11-295-199/+163
| | | | | This code and the related attributes are not specific to Enrollee functionality, so wps_common.c is the correct location for them.
* WPS: Pass device data into wps_enrollee_build_probe_req_ie()Jouni Malinen2008-11-292-10/+7
| | | | | Use configured device data instead of hardcoded values to generate WPS IE for Probe Request.
* WPS: Parse Request Type from WPS IE in (Re)AssocReq and derive mgmt keysJouni Malinen2008-11-296-11/+100
| | | | | | | WPS IE is now passed from hostapd association processing into EAP-WSC and WPS processing. Request Type attribute is parsed from this information and if the request is for a WLAN Manager Registrar, additional management keys are derived (to be used with UPnP).
* WPS: Added comments for main data structuresJouni Malinen2008-11-282-1/+13
|