aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* WPS: Check BSS table against current BSSID if credential does not matchJouni Malinen2017-12-021-0/+3
| | | | | | | | | The credential MAC address is not necessarily that of the AP, i.e., it is more likely to be that of the Enrollee. Check the scan results against the current BSSID as well if match is not found otherwise when going through the mixed mode workaround. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Map GCMP-256 and CCMP-256 to AES encryption typeJouni Malinen2017-12-021-1/+3
| | | | | | | This is needed to allow a credential to be built for GCMP-256/CCMP-256 networks that do not enable GCMP-128/CCMP-128. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Allow WPS to be enabled in CCMP-256 and GCMP-256 only casesShiva Sankar Gajula2017-12-021-1/+3
| | | | | | | | | Extend the check against WPA/TKIP only configuration by adding CCMP-256 and GCMP-256 to the list of allowed ciphers. This is needed to allow WPS to be enabled in AP configurations where neither CCMP-128 nor GCMP-128 are enabled. Signed-off-by: Shiva Sankar Gajula <sgajula@qti.qualcomm.com>
* tests: DPP testing to check for mutual authentication on InitiatorJouni Malinen2017-12-021-0/+26
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Indicate to upper layers whether mutual authentication was usedJouni Malinen2017-12-022-0/+4
| | | | | | | | DPP Responder selects whether mutual authentication is used. This commit adds information about that selection to upper layers (ctrl_iface event DPP-AUTH-DIRECTION mutual=<0/1>) on the Initiator side. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP exchange stopping unexpectedlyJouni Malinen2017-12-021-3/+121
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Extend protocol testing to allow exchange terminationJouni Malinen2017-12-022-0/+64
| | | | | | | This extends dpp_test functionality to allow DPP exchanges to be stopped when receiving a specified message. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Change Authentication Response retry time to 1 secondJouni Malinen2017-12-021-1/+1
| | | | | | | | The previously used 10 second timer did not really make much sense since the Initiator is not going to be waiting for the response that long. Change this to 1 second based on the DPP tech spec change. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: nl80211.py: Fix attribute paddingJohannes Berg2017-12-021-5/+7
| | | | | | | | | | The kernel started enforcing attribute lengths, and nl80211.py had been doing it all wrong - the padding must be present, but not part of the length. Fix it to do it the right way. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* nl80211: Fix NL80211_MESHCONF_AUTO_OPEN_PLINKS encodingJouni Malinen2017-12-011-2/+2
| | | | | | | | | | | | | | This nl80211 attribute uses NLA_U8 policy in cfg80211 and wpa_supplicant needs to use same size when writing the attribute. This fixes mesh mode regression triggered by kernel commit "net: netlink: Update attr validation to require exact length for some types" in v4.15-rc1 that resulted in the following debug log entry when trying to join a mesh: nl80211: mesh join failed: ret=-22 (Invalid argument) Fixes: 6c1664f6051f ("nl80211: Add new commands to support mesh interfaces") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Fix NL80211_ATTR_SMPS_MODE encodingJouni Malinen2017-12-011-1/+1
| | | | | | | | | | | | | | | This nl80211 attribute uses NLA_U8 policy in cfg80211 and hostapd/wpa_supplicant needs to use same size when writing the attribute. This fixes AP mode regression triggered by kernel commit "net: netlink: Update attr validation to require exact length for some types" in v4.15-rc1 that resulted in the following debug log entry when trying to enable beaconing: nl80211: Beacon set failed: -34 (Numerical result out of range) Fixes: da1080d7215f ("nl80211: Advertise and configure SMPS modes") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: sigma_dut and WPS PBC EnrolleeJouni Malinen2017-11-301-0/+29
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: sigma_dut controlled connection using preconfigured profileJouni Malinen2017-11-301-0/+25
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP protocol testing - invalid E-nonce in Conf ReqJouni Malinen2017-11-301-0/+5
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Extend dpp_test with invalid E-Nonce in Config ReqJouni Malinen2017-11-302-0/+8
| | | | | | | Allow an E-Nonce attribute with invalid length to be sent for protocol testing purposes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP protocol testing - invalid Transaction ID in Peer Disc ReqJouni Malinen2017-11-301-1/+1
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Extend dpp_test with invalid Transaction ID in Peer Disc ReqJouni Malinen2017-11-302-0/+7
| | | | | | | Allow a Transaction ID attribute with invalid length to be sent for protocol testing purposes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add QCA vendor command and attributes for RROPKrishna Rao2017-11-301-0/+82
| | | | | | | | | | Add QCA vendor command and attributes for vendor specific Representative RF Operating Parameter (RROP) information. This information is intended for optional use by external ACS. It provides guidance values for some RF parameters that are used by the system during operation, so that external ACS can utilize these to compare between channels, bands, etc. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Make dpp_auth_req_retries* more reliableJouni Malinen2017-11-301-8/+2
| | | | | | | | | | | These test cases were failing when run immediately after dpp_pkex_test_fail. It looks like timing of the TX status and the short eloop wait were getting reordered in this cases. This ended up with some of the DPP-TX-STATUS event messages missing. Instead of explicitly checking for those message, simply count the number of DPP-TX messages to verify that the correct number of retries are being sent. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Use consistent "0x" prefix for the cookie valuesJouni Malinen2017-11-301-1/+1
| | | | | | | | One of the event message for TX status was missing 'x' from the "0x" prefix. Add that to make the used format consistent for all cookie debug print cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Call wpas_dpp_stop() from wpas_dpp_deinit()Jouni Malinen2017-11-291-3/+1
| | | | | | | | This makes the full DPP deinit operation more consistent with stopping of a single operation. In practice, this adds the new GAS client stopping functionality. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP/PKEX and local failuresJouni Malinen2017-11-292-4/+272
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Stop pending GAS client operation on DPP_STOP_LISTENJouni Malinen2017-11-294-0/+25
| | | | | | | This makes the operation more complete in stopping all ongoing DPP related functionality. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Do not continue if public key hash derivation failsJouni Malinen2017-11-291-4/+5
| | | | | | | | | sha256_vector() result was ignored apart from printing out the failure in the debug log. This is not really a normal case and it is better to reject the full operation rather than try to continue with an incorrect public key hash value. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Fix memory leak on dpp_auth_build_conf() error pathsJouni Malinen2017-11-291-0/+1
| | | | | | The wpabuf for the message needs to be freed on the error paths. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* JSON: Fix a memory leak on an error pathJouni Malinen2017-11-291-0/+2
| | | | | | | | If the second json_alloc_token() call failed to allocate memory, json_parse() missed the first allocation on the error path. Assign the root pointer earlier for that case to avoid the potential memory leak. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Fix a memory leak on an error pathJouni Malinen2017-11-291-1/+1
| | | | | | | Need to free temporary allocations if dpp_build_conf_start() fails to allocate memory. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Deinit PKEX instance on DPP_STOP_LISTENJouni Malinen2017-11-292-0/+4
| | | | | | | Previously this stopped only the DPP Authentication instance, but it is better to clear both PKEX and Authentication. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Generate DPP Config Object for legacy network (PSK)Jouni Malinen2017-11-291-0/+6
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Clear authentication instance on configuration completion in APJouni Malinen2017-11-273-2/+17
| | | | | | | | wpa_supplicant was already doing this and hostapd needs to clear hapd->dpp_auth when completing the exchange in Configurator (GAS server) role. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: sigma_dut DPP AP Configurator using self-configurationJouni Malinen2017-11-271-0/+46
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Do not process dpp_auth_ok_on_ack multiple timesJouni Malinen2017-11-272-1/+6
| | | | | | | | An additional TX status callback could result in processing the DPP authentication completion another time at least with hostapd. Fix this by clearing the dpp_auth_ok_on_ack when processing it. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Fix compilation without CONFIG_TESTING_OPTIONS=yAshok Ponnaiah2017-11-271-0/+4
| | | | | | | Add CONFIG_TESTING_OPTIONS ifdef protection to couple of forgotten DPP test parameters in wpa_supplicant ctrl_iface. Signed-off-by: Ashok Ponnaiah <aponnaia@qti.qualcomm.com>
* DPP: Ignore GAS server status callback for unknown responseJouni Malinen2017-11-272-0/+9
| | | | | | | | | It was possible for a timeout from an old GAS server operation to trigger DPP configuration failure during the subsequent DPP operation. Fix this by verifying that the status callback is for the response generated during the same DPP Authentication/Configuration exchange. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP configurator (AP) signing own connectorJouni Malinen2017-11-271-0/+57
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Add DPP_CONFIGURATOR_SIGN support to hostapdJouni Malinen2017-11-276-45/+81
| | | | | | | | Configurator signing its own Connector was previously supported only in wpa_supplicant. This commit extends that to hostapd to allow an AP acting as a Configurator to self-configure itself. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Move hostapd Configurator/bootstrap data into global contextJouni Malinen2017-11-275-25/+55
| | | | | | | | | This moves the Configurator and Bootstrapping Information data from struct hostapd_data (per-BSS) to struct hapd_interfaces (per-hostapd process). This allows the information to be maintained over interface restarts and shared between interfaces. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP QR Code and mutual authentication with auto-generated keyJouni Malinen2017-11-261-0/+71
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Auto-generate Initiator bootstrapping info if neededJouni Malinen2017-11-262-10/+47
| | | | | | | | | | | | Instead of using the all-zeros Initiator Bootstrapping Key Hash when no local bootstrapping key is configuref for the Initiator, automatically generate a temporary bootstrapping key for the same curve that the Responder uses. If the Responder indicates that it wants to do mutual authentication, provide the URI for the auto-generated bootstrapping key in the DPP-RESPONSE-PENDING event for upper layers to display the QR Code. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Allow ap_ft for remote testsJanusz Dziedzic2017-11-261-12/+12
| | | | | | | Fix problem when running ap_ft test cases with real HW using remote tests and hwsim wrapper by using the newer hostapd.app_ap() API. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
* tests: Split ap_vht160 into two test cases (ap_vht160 and ap_vht160b)Jouni Malinen2017-11-261-36/+55
| | | | | | | | | | | | These VHT160 with DFS cases were in a single test case to optimize test execution time with parallel wait for the 60 second CAC. However, this design has become difficult to support with the kernel changes that allow radar events to be shared between interfaces. To avoid need for more workarounds here just for testing purposes, split this into two test cases so that conflicting events from another interface do not cause the test case to fail. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Split dfs_radar into two test cases (dfs_radar1 and dfs_radar2)Jouni Malinen2017-11-261-14/+19
| | | | | | | | | | | | These DFS radar detection cases were in a single test case to optimize test execution time with parallel wait for the 60 second CAC. However, this design has become difficult to support with the kernel changes that allow radar events to be shared between interfaces. To avoid need for more workarounds here just for testing purposes, split this into two test cases so that conflicting events from another interface do not cause the test case to fail. Signed-off-by: Jouni Malinen <j@w1.fi>
* nl80211: Filter global events based on wiphySriram R2017-11-261-2/+9
| | | | | | | | | | | | | Avoid same interface processing nl80211 events when at least one of IFIDX, WDEV, or WIPHY index attribute is available in the nl80211 event message. Previously, a same interface processes events when ifidx and wdev id attribute were not available in the nl80211 message. This is extended to check the presence of wiphy index attribute as well since some radar notifications include only WIPHY index attrbute in the nl80211 message. Signed-off-by: Sriram R <srirrama@qti.qualcomm.com>
* tests: Enable dynamic debugging for mac80211_hwsimLubomir Rintel2017-11-263-3/+3
| | | | | | | | | | | | | mac80211_hwsim module typically dumps a lot of details into the kernel message buffer. While it's probably okay in a dedicated VM, it's way too chatty in other setups. The kernel allows fine-tuning logging via the dynamic debugging facility. Let's enable all logging locations in the mac80211_hwsim module so that we don't loose debugging output when the kernel adopts the dynamic debug mechanism for the driver. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* tests: ap_ht40_scan to print STATUS and STA information to logJouni Malinen2017-11-251-0/+5
| | | | | | This can be used to check the supported rate information. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Add supported rate information into STATUS and STABhagavathi Perumal S2017-11-251-0/+80
| | | | | | | These allow external programs to determine supported legacy, HT, and VHT rates of an interface or a STA. Signed-off-by: Bhagavathi Perumal S <bperumal@qti.qualcomm.com>
* FILS: Do not leave error value in left counterJouni Malinen2017-11-241-3/+6
| | | | | | | | | | | If fils_decrypt_assoc() were to fail on the AP side, the previous implementation could have continued through the response generation using left = -1. That could have resulted in unexpected processing if this value were to be used as the length of the remaining (unencrypted) IEs. Fix this by not updating left in the failure case. Fixes: 78815f3dde6e ("FILS: Decrypt Association Request elements and check Key-Auth (AP)") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* WPA: Check wpa_eapol_key_mic() result on TXJouni Malinen2017-11-241-3/+6
| | | | | | | | | Verify that nothing unexpected happened with EAPOL-Key Key MIC calculation when transmitting EAPOL-Key frames from the Authenticator. This should not be able to happen in practice, but if if it does, there is no point in sending out the frame without the correct Key MIC value. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: DPP and PKEX (P-256) test vectorJouni Malinen2017-11-231-0/+57
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Allow PKEX x/X and y/Y keypairs to be overriddenJouni Malinen2017-11-233-0/+44
| | | | | | | This is for testing purposes to allow a test vector with specific values to be generated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>