]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
6 years agoRRM: Send reject/refuse response only to unicast measurement request
Avraham Stern [Sun, 11 Jun 2017 12:41:19 +0000 (15:41 +0300)] 
RRM: Send reject/refuse response only to unicast measurement request

IEEE Std 802.11-2016, 11.11.6 specifies that a station that is unable to
make a requested measurement or refuses to make a measurement shall
respond only if the measurement request was received within an
individually addressed radio measurement request frame, but shall not
respond if such a request was received in a group addressed frame.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agowpa_cli: Fix global control interface for STA-FIRST/STA-NEXT
Dmitry Shmidt [Mon, 22 May 2017 21:38:58 +0000 (21:38 +0000)] 
wpa_cli: Fix global control interface for STA-FIRST/STA-NEXT

If global control interface is used and wlan doesn't support P2P,
   wpa_s->global->p2p == NULL, and log shows:
wpa_supplicant: Failed to create interface p2p-dev-wlan0: -5 (I/O error)
wpa_supplicant: nl80211: Failed to create a P2P Device interface p2p-dev-wlan0
wpa_supplicant: P2P: Failed to enable P2P Device interface

Then STA-FIRST/STA-NEXT is not going to redirect to any interface,
making update_stations(ctrl_conn) is stuck in never-ending loop:

sendto(3, "STA-FIRST", 9, 0, NULL, 0)   = 9
pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995000})
recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24
pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995833})
recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24
pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995000})
recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
6 years agoDPP: Fix build with OpenSSL 1.1.0
Jouni Malinen [Mon, 17 Jul 2017 09:26:44 +0000 (12:26 +0300)] 
DPP: Fix build with OpenSSL 1.1.0

X509_ALGOR_get0() was modified to use const ** pointer as the first
argument in OpenSSL 1.1.0, so need to use different type here to avoid
compilation issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Clear default_passwd_cb more thoroughly
Jouni Malinen [Mon, 17 Jul 2017 09:06:17 +0000 (12:06 +0300)] 
OpenSSL: Clear default_passwd_cb more thoroughly

Previously, the pointer to strdup passwd was left in OpenSSL library
default_passwd_cb_userdata and even the default_passwd_cb was left set
on an error path. To avoid unexpected behavior if something were to
manage to use there pointers, clear them explicitly once done with
loading of the private key.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Fix private key password handling with OpenSSL >= 1.1.0f
Beniamino Galvani [Sun, 9 Jul 2017 09:14:10 +0000 (11:14 +0200)] 
OpenSSL: Fix private key password handling with OpenSSL >= 1.1.0f

Since OpenSSL version 1.1.0f, SSL_use_PrivateKey_file() uses the
callback from the SSL object instead of the one from the CTX, so let's
set the callback on both SSL and CTX. Note that
SSL_set_default_passwd_cb*() is available only in 1.1.0.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
6 years agoOpenSSL: Add build option to select default ciphers
Beniamino Galvani [Sun, 9 Jul 2017 09:06:50 +0000 (11:06 +0200)] 
OpenSSL: Add build option to select default ciphers

Add a build option to select different default ciphers for OpenSSL
instead of the hardcoded default "DEFAULT:!EXP:!LOW".

This new option is useful on distributions where the security level
should be consistent for all applications, as in Fedora [1]. In such
cases the new configuration option would be set to "" or
"PROFILE=SYSTEM" to select the global crypto policy by default.

[1] https://fedoraproject.org/wiki/Changes/CryptoPolicy

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
6 years agoOCE: Add hostapd mode OCE capability indication if enabled
Ashwini Patil [Fri, 16 Jun 2017 12:17:03 +0000 (17:47 +0530)] 
OCE: Add hostapd mode OCE capability indication if enabled

Add OCE IE in Beacon, Probe Response, and (Re)Association Response
frames if OCE is enabled in the configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoSTA: Add OCE capability indication attribute
Ashwini Patil [Mon, 10 Jul 2017 12:05:31 +0000 (17:35 +0530)] 
STA: Add OCE capability indication attribute

Add OCE capability indication attribute in Probe Request and
(Re)Association Request frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agonl80211: Check if driver supports OCE specific features
Ashwini Patil [Mon, 10 Jul 2017 09:33:01 +0000 (15:03 +0530)] 
nl80211: Check if driver supports OCE specific features

Check if device supports OCE STA/STA-CFON/AP specific mandatory
features. This commit includes checking based on the QCA vendor
attributes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoAdd vendor flags for OCE feature support indication
vamsi krishna [Fri, 7 Jul 2017 07:56:22 +0000 (13:26 +0530)] 
Add vendor flags for OCE feature support indication

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Fix issuing FILS connect to a non-FILS AP in driver-FILS case
Vidyullatha Kanchanapally [Wed, 12 Jul 2017 09:29:16 +0000 (14:59 +0530)] 
FILS: Fix issuing FILS connect to a non-FILS AP in driver-FILS case

If an AP is not FILS capable and wpa_supplicant has a saved network
block for the network with FILS key management and a saved erp info,
wpa_supplicant might end up issuing a FILS connection to a non-FILS AP.
Fix this by looking for the presence of FILS AKMs in wpa_s->key_mgmt,
i.e., after deciding on the AKM suites to use for the current
connection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoIntroduce a vendor attribute to represent the PNO/EPNO Request ID
Sunil Dutt [Thu, 13 Jul 2017 14:31:36 +0000 (20:01 +0530)] 
Introduce a vendor attribute to represent the PNO/EPNO Request ID

This request ID was wrongly referred from the REQUEST_ID in
enum qca_wlan_vendor_attr_gscan_config_params which is mapped to
QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM in PNO Config.
Hence define a different attribute to represent the request ID
for PNO Config.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Fix compilation with CONFIG_NO_WPA
Emmanuel Grumbach [Thu, 8 Jun 2017 08:18:00 +0000 (11:18 +0300)] 
FILS: Fix compilation with CONFIG_NO_WPA

wpa_fils_is_completed() was not defined.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
6 years agotests: Additional EAP-TTLS error path
Jouni Malinen [Sat, 8 Jul 2017 13:18:04 +0000 (16:18 +0300)] 
tests: Additional EAP-TTLS error path

This is a regression test for a memory leak on an error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoEAP-TTLS: Fix a memory leak on error paths
Jouni Malinen [Sat, 8 Jul 2017 13:21:01 +0000 (16:21 +0300)] 
EAP-TTLS: Fix a memory leak on error paths

The allocated challenge needs to be freed on these error paths as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoEAP-TTLS: Fix possible memory leak in eap_ttls_phase2_request_mschap()
Ilan Peer [Thu, 8 Jun 2017 08:17:59 +0000 (11:17 +0300)] 
EAP-TTLS: Fix possible memory leak in eap_ttls_phase2_request_mschap()

The msg buffer needs to be freed on these two error paths.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
6 years agoMBO: Fix possible memory leak in anqp_send_req()
Ilan Peer [Thu, 8 Jun 2017 08:17:58 +0000 (11:17 +0300)] 
MBO: Fix possible memory leak in anqp_send_req()

In case that an mbo object is allocated, but there is a failure
to resize the wpabuf, need to free the mbo object.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
6 years agotests: Additional LEAP error path
Jouni Malinen [Sat, 8 Jul 2017 13:13:05 +0000 (16:13 +0300)] 
tests: Additional LEAP error path

This is a regression test for a memory leak on an error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoEAP-LEAP: Fix possible memory leak in eap_leap_process_request()
Ilan Peer [Thu, 8 Jun 2017 08:17:57 +0000 (11:17 +0300)] 
EAP-LEAP: Fix possible memory leak in eap_leap_process_request()

Free 'resp' object in case of a failure to derive the response.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
6 years agoRRM: Filter scan results by parent TSF only if driver supports it
Avraham Stern [Thu, 8 Jun 2017 08:17:56 +0000 (11:17 +0300)] 
RRM: Filter scan results by parent TSF only if driver supports it

Scan results with parent TSF older than the scan start TSF are not added
to the beacon report since they are considered as scan results from
previous scans. However, for drivers that report the scan start TSF but
not the parent TSF of each scan result, the parent TSF will be zero so
valid scan results will be dropped.

Fix this by filtering scan results by the parent TSF only if the
driver supports reporting the parent TSF for each scan result.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agoap: Fix invalid HT40 channel pair fallback
Naftali Goldstein [Thu, 8 Jun 2017 08:17:55 +0000 (11:17 +0300)] 
ap: Fix invalid HT40 channel pair fallback

In case of incorrect HT40 configuration as part of an attempt to create
a 80 MHz AP, iface->conf->vht_oper_centr_freq_seg0_idx and
iface->conf->vht_oper_centr_freq_seg1_idx are zero'ed, but
iface->conf->vht_oper_chwidth remains VHT_CHANWIDTH_80MHZ. This causes
the logic in dfs_get_start_chan_idx to fail.

Fix this by setting iface->conf->vht_oper_chwidth to
VHT_CHANWIDTH_USE_HT when zero'ing the center frequency parameters.

Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
6 years agoap: Fix return value in hostapd_drv_switch_channel()
Ilan Peer [Thu, 8 Jun 2017 08:17:54 +0000 (11:17 +0300)] 
ap: Fix return value in hostapd_drv_switch_channel()

The documentation in driver.h state that in case of an error
-1 is returned.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
6 years agotests: Use global control interface in test_p2p_channel.py
Adiel Aloni [Thu, 22 Jun 2017 07:58:44 +0000 (10:58 +0300)] 
tests: Use global control interface in test_p2p_channel.py

Previously p2p_channel_drv_pref_* tests would fail
if dedicated P2P device is used, since the SET commands
were sent to incorrect interface.
Fix this by using a global control interface instead.

Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
6 years agoP2P: Clear get_pref_freq_list_override on P2P Device
Andrei Otcheretianski [Wed, 5 Jul 2017 18:25:05 +0000 (21:25 +0300)] 
P2P: Clear get_pref_freq_list_override on P2P Device

Clear the get_pref_freq_list_override in p2p_ctrl_flush(). This fixes
the case when a dedicated P2P device interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agotests: Print higher debug level on console
Johannes Berg [Tue, 30 May 2017 14:29:56 +0000 (16:29 +0200)] 
tests: Print higher debug level on console

We capture the dmesg that contains everything, but if a test
causes a kernel crash we will miss all logging at higher levels
like debug. Change the printk level to catch all of that too.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agotests: Catch various lockdep warnings
Johannes Berg [Tue, 30 May 2017 14:29:50 +0000 (16:29 +0200)] 
tests: Catch various lockdep warnings

Lockdep no longer prints "INFO:" but now prints "WARNING:".
Also add the "*** DEADLOCK ***" string it usually prints so
if it changes again we can keep finding that string.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoDPP: Fix compilation without openssl
Andrei Otcheretianski [Wed, 5 Jul 2017 18:25:07 +0000 (21:25 +0300)] 
DPP: Fix compilation without openssl

dpp.h file requires openssl in order to compile, which breaks
compilation on systems without it.
Move DPP_OUI_TYPE to ieee802_11_defs.h and don't include dpp.h when
not really needed.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agotests: Skip dpp_pkex_config dpp_pkex_config2 tests correctly
Andrei Otcheretianski [Wed, 5 Jul 2017 18:25:06 +0000 (21:25 +0300)] 
tests: Skip dpp_pkex_config dpp_pkex_config2 tests correctly

When CONFIG_DPP is not defined these tests would fail. Skip them.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agoP2P: Allow auto GO on DFS channels if driver supports this
Sunil Dutt [Tue, 13 Jun 2017 11:52:02 +0000 (17:22 +0530)] 
P2P: Allow auto GO on DFS channels if driver supports this

If a DFS forced frequency is provided in 'p2p_group_add' and the driver
supports DFS offload, the frequency was rejected in
wpas_p2p_init_go_params(). However, it was accepted in
wpas_p2p_select_go_freq() and wpas_p2p_group_add(). To make the behavior
consistent, the DFS frequency is now accepted in
wpas_p2p_init_go_params() similar to the way done in
wpas_p2p_select_go_freq().

Redundant check in wpas_p2p_group_add() for DFS forced frequency is
removed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Advertize FILS capability based on driver capability
Vidyullatha Kanchanapally [Thu, 22 Jun 2017 13:30:15 +0000 (19:00 +0530)] 
FILS: Advertize FILS capability based on driver capability

Add changes to control interface command get_capability to advertize
FILS capability, FILS AKMs suites, and FILS Authentication algorithms
based on the driver capabilities.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFix a typo in vendor attribute documentation
Jouni Malinen [Fri, 7 Jul 2017 10:26:45 +0000 (13:26 +0300)] 
Fix a typo in vendor attribute documentation

The attribute is QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SAR_ENABLE, not
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_SELECT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Add HLP support with driver-based AP SME
Jeffin Mammen [Thu, 6 Jul 2017 10:57:54 +0000 (13:57 +0300)] 
FILS: Add HLP support with driver-based AP SME

This allows HLP processing to postpone association processing in
hostapd_notify_assoc().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Fix the IP header protocol field in HLP DHCP response
Jeffin Mammen [Thu, 6 Jul 2017 10:58:50 +0000 (13:58 +0300)] 
FILS: Fix the IP header protocol field in HLP DHCP response

The IP header should indicate that UDP is used in the message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: FILS ERP authentication followed by PMKSA caching
Vidyullatha Kanchanapally [Wed, 5 Jul 2017 14:55:10 +0000 (17:55 +0300)] 
tests: FILS ERP authentication followed by PMKSA caching

This test case verifies that both wpa_supplicant and hostapd are adding
a PMKSA cache entry based on FILS shared key authentication using ERP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: ERP-based PMKSA cache addition on AP
Jouni Malinen [Wed, 5 Jul 2017 14:52:23 +0000 (17:52 +0300)] 
FILS: ERP-based PMKSA cache addition on AP

hostapd did not add a new PMKSA cache entry when FILS shared key
authentication was used, i.e., only the initial full authentication
resulted in a PMKSA cache entry being created. Derive the PMKID for the
ERP case as well and add a PMKSA cache entry if the ERP exchange
succeeds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Fix a frame name in a debug print
Jouni Malinen [Wed, 5 Jul 2017 14:29:44 +0000 (17:29 +0300)] 
FILS: Fix a frame name in a debug print

The EAP message included in FILS Wrapped Data from the non-AP STA to the
AP is EAP-Initiate/Re-auth.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoMBO: Whitespace cleanup
Jouni Malinen [Tue, 4 Jul 2017 21:56:40 +0000 (00:56 +0300)] 
MBO: Whitespace cleanup

Fix couple of previously missed whitespace issues.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoOCE: Define OCE attributes and other related macros
Ashwini Patil [Thu, 15 Jun 2017 07:29:32 +0000 (12:59 +0530)] 
OCE: Define OCE attributes and other related macros

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: Scan for a specific BSSID
Jouni Malinen [Tue, 4 Jul 2017 21:39:09 +0000 (00:39 +0300)] 
tests: Scan for a specific BSSID

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoAdd wpa_supplicant ctrl iface support to scan for a specific BSSID
Ashwini Patil [Thu, 11 May 2017 07:52:00 +0000 (13:22 +0530)] 
Add wpa_supplicant ctrl iface support to scan for a specific BSSID

Add support to scan for a specific BSSID through the wpa_supplicant
control interface.

Usage: wpa_cli scan bssid=ab:bc:cd:de:ef:12

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP configurator signing own connector
Jouni Malinen [Tue, 4 Jul 2017 14:49:29 +0000 (17:49 +0300)] 
tests: DPP configurator signing own connector

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add DPP_CONFIGURATOR_SIGN to generate own connector
Jouni Malinen [Tue, 4 Jul 2017 14:48:44 +0000 (17:48 +0300)] 
DPP: Add DPP_CONFIGURATOR_SIGN to generate own connector

The DPP Configurator can use this new command to generate its own signed
connector for the network that it manages.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add control interface commands into hostapd_cli
Jouni Malinen [Tue, 4 Jul 2017 12:55:30 +0000 (15:55 +0300)] 
DPP: Add control interface commands into hostapd_cli

These are copied from wpa_cli.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP_BOOTSTRAP_INFO with hostapd
Jouni Malinen [Tue, 4 Jul 2017 12:49:35 +0000 (15:49 +0300)] 
tests: DPP_BOOTSTRAP_INFO with hostapd

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: DPP_BOOTSTRAP_INFO for hostapd
Jouni Malinen [Tue, 4 Jul 2017 12:45:37 +0000 (15:45 +0300)] 
DPP: DPP_BOOTSTRAP_INFO for hostapd

This extends the hostapd control interface to support the
DPP_BOOTSTRAP_INFO command that was recently added for wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Share bootstrap type to string helper function
Jouni Malinen [Tue, 4 Jul 2017 12:45:03 +0000 (15:45 +0300)] 
DPP: Share bootstrap type to string helper function

This can be used in hostapd as well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Allow wpa_cli DPP_CONFIGURATOR_ADD without arguments
Jouni Malinen [Tue, 4 Jul 2017 12:38:52 +0000 (15:38 +0300)] 
DPP: Allow wpa_cli DPP_CONFIGURATOR_ADD without arguments

All the arguments to this command are optional, so do not mandate at
least one to be included in wpa_cli.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: Clear ignore_old_scan_res after sigma_dut test cases
Jouni Malinen [Mon, 3 Jul 2017 12:58:58 +0000 (15:58 +0300)] 
tests: Clear ignore_old_scan_res after sigma_dut test cases

sigma_dut can end up setting ignore_old_scan_res=1 and that can result
in some of the consecutive test cases failing. Fix this by explicitly
clearing ignore_old_scan_res after sigma_dut cases that may have ended
up setting the parameter.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: key_mgmt values OWE and DPP
Jouni Malinen [Mon, 3 Jul 2017 11:33:58 +0000 (14:33 +0300)] 
tests: key_mgmt values OWE and DPP

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoAdd new key_mgmt values for wpa_supplicant STATUS command
Jouni Malinen [Mon, 3 Jul 2017 11:33:16 +0000 (14:33 +0300)] 
Add new key_mgmt values for wpa_supplicant STATUS command

Recently added OWE and DPP were missing from the key_mgmt string list.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: mgmt_group_cipher in STATUS
Jouni Malinen [Mon, 3 Jul 2017 11:29:10 +0000 (14:29 +0300)] 
tests: mgmt_group_cipher in STATUS

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoAdd mgmt_group_cipher to wpa_supplicant STATUS command
Jouni Malinen [Mon, 3 Jul 2017 11:28:24 +0000 (14:28 +0300)] 
Add mgmt_group_cipher to wpa_supplicant STATUS command

This can be used to check which management group cipher is used in an
association that uses PMF.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoUpdate default wpa_group_rekey to once-per-day when using CCMP/GCMP
Jouni Malinen [Mon, 3 Jul 2017 10:42:55 +0000 (13:42 +0300)] 
Update default wpa_group_rekey to once-per-day when using CCMP/GCMP

The default value for GTK rekeying period was previously hardcoded to
600 seconds for all cases. Leave that short value only for TKIP as group
cipher while moving to the IEEE 802.11 default value of 86400 seconds
(once-per-day) for CCMP/GCMP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Set PMKSA expiration based on peer connector
Jouni Malinen [Sun, 2 Jul 2017 09:36:41 +0000 (12:36 +0300)] 
DPP: Set PMKSA expiration based on peer connector

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP configurator in hostapd
Jouni Malinen [Mon, 3 Jul 2017 09:56:29 +0000 (12:56 +0300)] 
tests: DPP configurator in hostapd

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Update hostapd configurator parameters to match wpa_supplicant
Jouni Malinen [Mon, 3 Jul 2017 10:01:35 +0000 (13:01 +0300)] 
DPP: Update hostapd configurator parameters to match wpa_supplicant

This updates the previously copied implementation to be up-to-date with
the more recent wpa_supplicant changes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Configurator in hostapd
Jouni Malinen [Mon, 3 Jul 2017 09:56:48 +0000 (12:56 +0300)] 
DPP: Configurator in hostapd

This integrates DPP configuration request processing into hostapd GAS
server implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP PKEX in hostapd
Jouni Malinen [Sun, 2 Jul 2017 19:10:41 +0000 (22:10 +0300)] 
tests: DPP PKEX in hostapd

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: PKEX in hostapd
Jouni Malinen [Sun, 2 Jul 2017 09:36:48 +0000 (12:36 +0300)] 
DPP: PKEX in hostapd

Allow hostapd to initiate and respond with PKEX bootstrapping similarly
to how this was implemented in wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: hostapd as DPP Authentication initiator
Jouni Malinen [Sun, 2 Jul 2017 18:42:32 +0000 (21:42 +0300)] 
tests: hostapd as DPP Authentication initiator

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Check JWS protected header alg against C-sign-key curve
Jouni Malinen [Sun, 2 Jul 2017 09:36:38 +0000 (12:36 +0300)] 
DPP: Check JWS protected header alg against C-sign-key curve

These need to be compatible for the JWS protected header signing to be
valid, so add an explicit check to confirm this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP auth responder acting as configurator
Jouni Malinen [Sun, 2 Jul 2017 09:36:36 +0000 (12:36 +0300)] 
tests: DPP auth responder acting as configurator

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Configurator parameters in responder role
Jouni Malinen [Sun, 2 Jul 2017 09:36:33 +0000 (12:36 +0300)] 
DPP: Configurator parameters in responder role

This allows wpa_supplicant to be configured to act as the configurator
in the case where a peer device initiates DPP Authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Update JWS algorithm strings for Brainpool curves
Jouni Malinen [Sun, 2 Jul 2017 09:36:31 +0000 (12:36 +0300)] 
DPP: Update JWS algorithm strings for Brainpool curves

Instead of trying to share the existing definitions for NIST curves,
start using unique strings for Brainpool curves.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Rename Brainpool curve names for JSON
Jouni Malinen [Sun, 2 Jul 2017 09:36:28 +0000 (12:36 +0300)] 
DPP: Rename Brainpool curve names for JSON

This removes the "R1" postfix from the names used in JSON.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP PKEX test cases
Jouni Malinen [Sun, 2 Jul 2017 09:36:25 +0000 (12:36 +0300)] 
tests: DPP PKEX test cases

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: PKEX bootstrapping
Jouni Malinen [Sun, 2 Jul 2017 09:36:23 +0000 (12:36 +0300)] 
DPP: PKEX bootstrapping

This implements genric PKEX functionality in src/common/dpp.c and glue
code to use this in wpa_supplicant (i.e, hostapd DPP implementation does
not yet support PKEX).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add helper functions for running hash operations
Jouni Malinen [Sun, 2 Jul 2017 09:36:20 +0000 (12:36 +0300)] 
DPP: Add helper functions for running hash operations

Use helper functions to cover all three different hash algorithm options
for DPP operations instead of having separate calls to each function at
every location a hash operation based on the curve is needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Increase hostapd_cli buffer limits
Jouni Malinen [Sun, 2 Jul 2017 09:36:18 +0000 (12:36 +0300)] 
DPP: Increase hostapd_cli buffer limits

This is needed for DPP events/commands.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Fix configuration item list
Jouni Malinen [Sun, 2 Jul 2017 09:36:15 +0000 (12:36 +0300)] 
DPP: Fix configuration item list

This was supposed to use semicolons, not commas..

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: More debug for own connector configuration errors
Jouni Malinen [Sun, 2 Jul 2017 09:36:11 +0000 (12:36 +0300)] 
DPP: More debug for own connector configuration errors

This makes it easier to notice a reason for failure in cases a connector
string has been truncated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Fix JWK debug prints
Jouni Malinen [Sun, 2 Jul 2017 09:36:01 +0000 (12:36 +0300)] 
DPP: Fix JWK debug prints

This function is used for parsing both the C-sign-key and netAccessKey,
so better not imply that all cases are C-sign-key in the debug prints.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agonl80211/MBO: Set temporary disallowed BSSID list to driver
Ashwini Patil [Wed, 21 Jun 2017 14:46:07 +0000 (20:16 +0530)] 
nl80211/MBO: Set temporary disallowed BSSID list to driver

Set temporary disallowed BSSID list to the driver so that the driver
doesn't try to connect to any of the blacklisted BSSIDs during
driver-based roaming operation. This commit includes support only for
the nl80211 driver interface using a QCA vendor command for this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoERP: Derive ERP key only after successful EAP authentication
Vidyullatha Kanchanapally [Mon, 12 Jun 2017 09:25:52 +0000 (14:55 +0530)] 
ERP: Derive ERP key only after successful EAP authentication

ERP key was previously derived immediately after the availability of
EMSK and Session-Id and the ERP key hierarchy was saved even if the
authentication resulted in failure eventually. Instead, derive the ERP
key only after a successful EAP authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoAdd Set Wi-Fi Configuration vendor attribute to configure LRO
Sunil Dutt [Wed, 24 May 2017 09:16:15 +0000 (14:46 +0530)] 
Add Set Wi-Fi Configuration vendor attribute to configure LRO

This can be used to dynamically enable/disable LRO.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoIntroduce a vendor command to specify the active Type Of Service
Sunil Dutt [Wed, 14 Jun 2017 06:07:37 +0000 (11:37 +0530)] 
Introduce a vendor command to specify the active Type Of Service

This commit introduces QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS to specify
the active Type Of Service on the specific interface. This can be used
to modify some of the low level scan parameters (off channel dwell time,
home channel time) in the driver/firmware.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agonl80211: Make KCK attribute optional in rekey data
Vidyullatha Kanchanapally [Tue, 13 Jun 2017 13:39:08 +0000 (19:09 +0530)] 
nl80211: Make KCK attribute optional in rekey data

New AKM suites like FILS-SHA256 do not use KCK and hence KCK length can
be zero. Add changes to include KCK attribute in rekey data only if the
length is non-zero.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: sigma_dut test cases
Jouni Malinen [Fri, 23 Jun 2017 11:33:38 +0000 (14:33 +0300)] 
tests: sigma_dut test cases

Add possibility to test sigma_dut functionality as part of the hwsim
test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: Update DPP legacy config cases to provide the passphrase
Jouni Malinen [Thu, 22 Jun 2017 12:57:53 +0000 (15:57 +0300)] 
tests: Update DPP legacy config cases to provide the passphrase

This is now needed from the control interface since the hardcoded
default value has been removed from the implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Allow passphrase to be set for Configurator
Jouni Malinen [Thu, 22 Jun 2017 12:57:09 +0000 (15:57 +0300)] 
DPP: Allow passphrase to be set for Configurator

The new pass=<hexdump> parameter to DPP_AUTH_INIT can now be used to
specify the passphrase to use in config object.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP Configurator getting SSID from control interface
Jouni Malinen [Thu, 22 Jun 2017 12:12:43 +0000 (15:12 +0300)] 
tests: DPP Configurator getting SSID from control interface

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Allow SSID to be set for Configurator
Jouni Malinen [Thu, 22 Jun 2017 12:11:22 +0000 (15:11 +0300)] 
DPP: Allow SSID to be set for Configurator

The new ssid=<hexdump> parameter to DPP_AUTH_INIT can now be used to
specify the SSID to use in config object.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoJSON: Fix \u escaping
Jouni Malinen [Thu, 22 Jun 2017 12:09:57 +0000 (15:09 +0300)] 
JSON: Fix \u escaping

Remove the extra 'x' character from the escaped string.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add an example python script for QR Code operations
Jouni Malinen [Thu, 22 Jun 2017 11:52:28 +0000 (14:52 +0300)] 
DPP: Add an example python script for QR Code operations

This script can be used to process Android logcat information for
scanned QR Codes (e.g., from Barcode Scanner app) and also to display QR
Codes for locally generated bootstrap keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add DPP_BOOTSTRAP_INFO command
Jouni Malinen [Thu, 22 Jun 2017 11:51:21 +0000 (14:51 +0300)] 
DPP: Add DPP_BOOTSTRAP_INFO command

This can be used to fetch parsed details on bootstrapping information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP automatic network profile processing
Jouni Malinen [Wed, 21 Jun 2017 15:01:34 +0000 (18:01 +0300)] 
tests: DPP automatic network profile processing

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Automatic network profile creation
Jouni Malinen [Wed, 21 Jun 2017 15:01:51 +0000 (18:01 +0300)] 
DPP: Automatic network profile creation

wpa_supplicant can now be configured to generate a network profile
automatically based on DPP configuration. The following
dpp_config_processing values can be used to specify the behavior:
0 = report received configuration to an external program for
    processing; do not generate any network profile internally (default)
1 = report received configuration to an external program and generate
    a network profile internally, but do not automatically connect
    to the created (disabled) profile; the network profile id is
    reported to external programs
2 = report received configuration to an external program, generate
    a network profile internally, try to connect to the created
    profile automatically

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoFILS: Fix EVENT_ASSOC processing checks for driver-SME
Jouni Malinen [Mon, 19 Jun 2017 18:34:10 +0000 (21:34 +0300)] 
FILS: Fix EVENT_ASSOC processing checks for driver-SME

Commit 5538fc930988bfc12935579b2b9930d18ffd1be8 ('FILS: Track completion
with FILS shared key authentication offload') added an additional case
for calling wpa_supplicant_event_assoc_auth() from EVENT_ASSOC handling
in case of FILS-completion with driver-based-SME. However, that checked
what placed outside the data != NULL case while data != NULL needs to
apply for this case as well due to wpa_supplicant_event_assoc_auth()
behavior. Move the data != NULL check to apply to both cases to avoid
potentially issues if a driver interface were to return EVENT_ASSOC
without the associate data. (CID 164708)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoMake wpa_config_read_blob() easier for static analyzers
Jouni Malinen [Mon, 19 Jun 2017 18:28:37 +0000 (21:28 +0300)] 
Make wpa_config_read_blob() easier for static analyzers

While encoded == NULL could happen in the case of an empty blob, that
will result in encoded_len == 0 and base64_decode() not derefencing the
src argument. That seems to be too difficult for some static analyzers,
so to avoid false warnings, explicitly reject the encoded == NULL case
without even trying to base64 decode it. (CID 164709)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP bootstrapping, authentication, and configuration exchanges
Jouni Malinen [Thu, 15 Jun 2017 18:18:20 +0000 (21:18 +0300)] 
tests: DPP bootstrapping, authentication, and configuration exchanges

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Network Introduction protocol for wpa_supplicant
Jouni Malinen [Sun, 18 Jun 2017 17:19:25 +0000 (20:19 +0300)] 
DPP: Network Introduction protocol for wpa_supplicant

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Network Introduction protocol for hostapd
Jouni Malinen [Sun, 18 Jun 2017 17:19:57 +0000 (20:19 +0300)] 
DPP: Network Introduction protocol for hostapd

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Network Introduction protocol
Jouni Malinen [Sun, 18 Jun 2017 17:19:57 +0000 (20:19 +0300)] 
DPP: Network Introduction protocol

This commit adds generic helper functions for going through Network
Introduction protocol.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: AP parameters for DPP AKM
Jouni Malinen [Sun, 18 Jun 2017 14:29:57 +0000 (17:29 +0300)] 
DPP: AP parameters for DPP AKM

Extend hostapd configuration to include parameters needed for the DPP
AKM: dpp_connector, dpp_netaccesskey, dpp_netaccesskey_expiry,
dpp_csign, dpp_csign_expiry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Network profile parameters for DPP AKM
Jouni Malinen [Sun, 18 Jun 2017 10:48:57 +0000 (13:48 +0300)] 
DPP: Network profile parameters for DPP AKM

Extend wpa_supplicant network profile to include parameters needed for
the DPP AKM: dpp_connector, dpp_netaccesskey, dpp_netaccesskey_expiry,
dpp_csign, dpp_csign_expiry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Allow PMKSA cache entries to be added through hostapd ctrl_iface
Jouni Malinen [Sun, 18 Jun 2017 11:14:18 +0000 (14:14 +0300)] 
DPP: Allow PMKSA cache entries to be added through hostapd ctrl_iface

This allows external programs to generate and add PMKSA cache entries
into hostapd. The main use for this is to run external DPP processing
(network introduction) and testing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add new AKM
Jouni Malinen [Sat, 17 Jun 2017 20:48:52 +0000 (23:48 +0300)] 
DPP: Add new AKM

This new AKM is used with DPP when using the signed Connector to derive
a PMK. Since the KCK, KEK, and MIC lengths are variable within a single
AKM, this needs number of additional changes to get the PMK length
delivered to places that need to figure out the lengths of the PTK
components.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Integration for hostapd
Jouni Malinen [Thu, 15 Jun 2017 19:16:45 +0000 (22:16 +0300)] 
DPP: Integration for hostapd

This adds DPP bootstrapping, authentication, and configuration into
hostapd similarly to how the design was integrated in wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Add wpa_cli commands for DPP operations
Jouni Malinen [Thu, 15 Jun 2017 18:18:17 +0000 (21:18 +0300)] 
DPP: Add wpa_cli commands for DPP operations

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Configuration exchange
Jouni Malinen [Thu, 15 Jun 2017 18:18:15 +0000 (21:18 +0300)] 
DPP: Configuration exchange

This adds support for DPP Configuration Protocol using GAS. Full
generation and processing of the configuration object is not included in
this commit.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>