]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
6 years agohostapd: Add last_ack_rssi into ctrl iface cmd STA
Bhagavathi Perumal S [Tue, 6 Mar 2018 09:00:11 +0000 (14:30 +0530)] 
hostapd: Add last_ack_rssi into ctrl iface cmd STA

This allows external application to get last ACK signal strength of the
last transmitted frame if the driver makes this information
(NL80211_STA_INFO_ACK_SIGNAL) available.

Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
6 years agoAdd hostapd_cli poll_sta command
Bhagavathi Perumal S [Tue, 6 Mar 2018 09:00:11 +0000 (14:30 +0530)] 
Add hostapd_cli poll_sta command

This uses the already existing POLL_STA control interface to poll an
associated station to check connectivity.

Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
6 years agoOWE: Clean up pointer check in a testing code path
Ashok Ponnaiah [Mon, 5 Mar 2018 05:29:18 +0000 (10:59 +0530)] 
OWE: Clean up pointer check in a testing code path

Check wpa_auth_write_assoc_resp_owe() return value to keep static
analyzers happier. The code path where this could happen is not really
reachable due to the separate hapd->conf->own_ie_override check and
wpa_auth_write_assoc_resp_owe() returning NULL only in an error case in
the override path. Furthermore, clean up the pointer return value to use
a proper pointer (NULL vs. 0).

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Mon, 19 Mar 2018 17:08:15 +0000 (19:08 +0200)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2018-02-13.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: DPP Configurator reconfiguration
Jouni Malinen [Fri, 16 Mar 2018 18:43:54 +0000 (20:43 +0200)] 
tests: DPP Configurator reconfiguration

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoDPP: Support retrieving of configurator's private key
Purushottam Kushwaha [Fri, 16 Mar 2018 10:04:21 +0000 (15:34 +0530)] 
DPP: Support retrieving of configurator's private key

To retain configurator information across hostapd/wpa_supplicant
restart, private key need to be maintained to generate a valid pair of
authentication keys (connector, netaccess_key, csign) for new enrollees
in the network.

Add a DPP_CONFIGURATOR_GET_KEY control interface API through which the
private key of an existing configurator can be fetched.

Command format:
DPP_CONFIGURATOR_GET_KEY <configurator_id>

The output from this command can then be used with
"DPP_CONFIGURATOR_ADD key=<hexdump>" to create the same key again.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoSAE: Fix EAPOL-Key integrity and key-wrap algorithm selection
Jouni Malinen [Fri, 16 Mar 2018 11:04:15 +0000 (13:04 +0200)] 
SAE: Fix EAPOL-Key integrity and key-wrap algorithm selection

The SAE AKM 00-0F-AC:8 is supposed to use EAPOL-Key Key Descriptor
Version 0 (AKM-defined) with AES-128-CMAC and NIST AES Key Wrap.
However, the previous implementation ended up using Key Descriptor
Version 2 (HMAC-SHA-1-128 and NIST AES Key Wrap). Fix this by using the
appropriate Key Descriptor Version and integrity algorithm. Use helper
functions to keep the selection clearer and more consistent between
wpa_supplicant and hostapd uses.

Note: This change is not backwards compatible. Both the AP and station
side implementations will need to be updated at the same time to
maintain functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: DPP protocol testing - stop when transmitting Auth Conf
Jouni Malinen [Mon, 12 Mar 2018 23:04:03 +0000 (01:04 +0200)] 
tests: DPP protocol testing - stop when transmitting Auth Conf

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoDPP: Extend dpp_test 89 functionality to transmit side
Srinivas Dasari [Wed, 7 Mar 2018 11:56:26 +0000 (17:26 +0530)] 
DPP: Extend dpp_test 89 functionality to transmit side

This extends dpp_test functionality to allow DPP exchanges to be stopped
after authentication is completed on the Initiator, i.e., after sending
out the Authentication Confirm message. Previously, dpp_test=89 was used
only on the Responder side to stop after receiving the Authentication
Confirm message. The main use case for this extended functionality is to
be able to stop the protocol exchange on a device that acts as
authentication Initiator and Enrollee.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoUse correct WPA_ALG_* values to compare for enum wpa_alg
Purushottam Kushwaha [Mon, 12 Mar 2018 14:44:48 +0000 (20:14 +0530)] 
Use correct WPA_ALG_* values to compare for enum wpa_alg

enum wpa_alg was being compared with WPA_CIPHER_* values. That does not
work here and strict compilers will report this as an error. Fix the
comparision to use proper WPA_ALG_* values. This fixes testing
capability for resetting IPN for BIP.

Fixes: 16579769ff7b ("Add testing functionality for resetting PN/IPN for configured keys")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agomka: Mark ieee802_1x_kay_create_mka() ckn and cak arguments const
Jouni Malinen [Sun, 11 Mar 2018 15:04:34 +0000 (17:04 +0200)] 
mka: Mark ieee802_1x_kay_create_mka() ckn and cak arguments const

These structures are not modified or freed (i.e., only data from them is
copied), so mark the arguments const to document this a bit more clearly
now that there was a memory leak in one of the callers to this function.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agowpa_supplicant: Fix memory leaks in ieee802_1x_create_preshared_mka()
Davide Caratti [Thu, 8 Mar 2018 16:15:02 +0000 (17:15 +0100)] 
wpa_supplicant: Fix memory leaks in ieee802_1x_create_preshared_mka()

In case MKA is initialized successfully, local copies of CAK and CKN
were allocated, but never freed. Ensure that such memory is released
also when ieee802_1x_kay_create_mka() returns a valid pointer.

Fixes: ad51731abf06 ("wpa_supplicant: Allow pre-shared (CAK,CKN) pair for MKA")
Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
6 years agomka: Do not print contents of SAK to debug log
Mike Siedzik [Tue, 20 Feb 2018 19:28:40 +0000 (14:28 -0500)] 
mka: Do not print contents of SAK to debug log

Log newly generated SAKs as well as unwrapped SAKs with wpa_hexdump_key()
rather than wpa_hexdump(). By default, the wpa_hexdump_key() function
will not display sensitive key data.

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agomka: Detect duplicate MAC addresses during key server election
Mike Siedzik [Tue, 20 Feb 2018 19:28:37 +0000 (14:28 -0500)] 
mka: Detect duplicate MAC addresses during key server election

In the unlikely event the local KaY and the elected peer have the same
actor priority as well as the same MAC address, log a warning message
and do not elect a key server. Resolution is for network administrator
to reconfigure MAC address.

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agomka: Loss of live peers to result in connect PENDING not AUTHENTICATED
Mike Siedzik [Tue, 20 Feb 2018 19:28:34 +0000 (14:28 -0500)] 
mka: Loss of live peers to result in connect PENDING not AUTHENTICATED

When the number of live peers becomes 0 the KaY was setting
kay->authenticated true and telling the CP to connect AUTHENTICATED.
Per IEEE Std 802.1X-2010 Clause 12.2, MKA.authenticated means "the Key
Server has proved mutual authentication but has determined that
Controlled Port communication should proceed without the use of MACsec",
which means port traffic will be passed in the clear.

When the number of live peers becomes 0 the KaY must instead set
kay->authenticated false and tell the CP to connect PENDING. Per Clause
12.3 connect PENDING will "prevent connectivity by clearing the
controlledPortEnabled parameter."

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agomka: Ignore MACsec SAK Use Old Key parameter if we don't have our old key
Mike Siedzik [Tue, 20 Feb 2018 19:28:32 +0000 (14:28 -0500)] 
mka: Ignore MACsec SAK Use Old Key parameter if we don't have our old key

Upon receipt of the "MACsec MKPDU SAK Use parameter set" the KaY verifies
that both the latest key and the old key are valid. If the local system
reboots or is reinitialized, the KaY won't have a copy of its old key.
Therefore if the KaY does not have a copy of its old key it should not
reject MKPDUs that contain old key data in the MACsec SAK Use parameter.

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agomka: When matching CKNs ensure that lengths are identical
Mike Siedzik [Tue, 20 Feb 2018 19:28:31 +0000 (14:28 -0500)] 
mka: When matching CKNs ensure that lengths are identical

KaY looks up participants using CAK Name (CKN). Per IEEE Std 802.1X-2010
Clause 9.3.1 CAK identification, the CKN is an integral number of
octets, between 1 and 32 (inclusive). This fix will ensure that the KaY
does not inadvertently match CKNs such as 'myCakNamedFoo' and
'myCakNamedFooBar'.

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agotests: Add support for wolfSSL cryptographic library
Sean Parkinson [Thu, 18 Jan 2018 02:26:39 +0000 (12:26 +1000)] 
tests: Add support for wolfSSL cryptographic library

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
6 years agotests: Check PKCS#12 support in additional test cases
Sean Parkinson [Thu, 18 Jan 2018 02:26:39 +0000 (12:26 +1000)] 
tests: Check PKCS#12 support in additional test cases

These test cases use PKCS#12, so skip them if the build does not include
support for it.

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
6 years agotests: Verify MSCHAPV2 support in eap_peap_session_resumption
Sean Parkinson [Thu, 18 Jan 2018 02:26:39 +0000 (12:26 +1000)] 
tests: Verify MSCHAPV2 support in eap_peap_session_resumption

This test case uses EAP-MSCHAPv2 within the PEAP tunnel, so verify that
the build includes support for that before running the test.

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
6 years agoAdd support for wolfSSL cryptographic library
Sean Parkinson [Thu, 18 Jan 2018 02:26:39 +0000 (12:26 +1000)] 
Add support for wolfSSL cryptographic library

Allow hostapd/wpa_supplicant to be compiled with the wolfSSL
cryptography and TLS library.

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
6 years agoExtend ACL check for Probe Request frames
Tamizh chelvam [Wed, 14 Feb 2018 13:43:56 +0000 (19:13 +0530)] 
Extend ACL check for Probe Request frames

Extend ACL check to deny Probe Request frames for the client which does
not pass ACL check. Skip this check for the case where RADIUS ACL is
used to avoid excessive load on the RADIUS authentication server due to
Probe Request frames. This patch add wpa_msg event for auth and assoc
rejection due to acl reject.

Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
6 years agoAdd new WiFi test config attributes to configure BA params
Kiran Kumar Lokere [Tue, 27 Feb 2018 03:23:04 +0000 (19:23 -0800)] 
Add new WiFi test config attributes to configure BA params

Define a new WiFi test configuration attributes in QCA vendor
command to configure BA session parameters and to add or
delete a BA session and to configure no ack policy.
This is used for configuring the testbed device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoAdd new WiFi test config attribute to allow WEP/TKIP in HE
Kiran Kumar Lokere [Tue, 27 Feb 2018 02:54:37 +0000 (18:54 -0800)] 
Add new WiFi test config attribute to allow WEP/TKIP in HE

Define a new WiFi test configuration attribute in QCA vendor
command to allow or not to allow WEP/TKIP in HT/VHT/HE mode.
This is used for configuring the testbed device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoFILS: Check kde more consistently to avoid static analyzer warnings
Jeffin Mammen [Fri, 2 Mar 2018 19:10:38 +0000 (21:10 +0200)] 
FILS: Check kde more consistently to avoid static analyzer warnings

For FILS, __wpa_send_eapol() is called only with the kde != NULL, but a
static analyzer might not understand that. Add an explicit check kde !=
NULL similarly to the other cases going through the kde parameter to
silence such bogus warnings.

Signed-off-by: Jeffin Mammen <jmammen@codeaurora.org>
6 years agoSAE: Debug print group support in the crypto library
Jouni Malinen [Fri, 2 Mar 2018 10:29:30 +0000 (12:29 +0200)] 
SAE: Debug print group support in the crypto library

This makes it easier to understand why "SAE: Failed to select group"
debug entry shows up in cases the selected crypto library does not
support a specific group.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoSAE: Fix potential infinite loop in mismatching PMK case on AP
Jouni Malinen [Fri, 2 Mar 2018 10:13:16 +0000 (12:13 +0200)] 
SAE: Fix potential infinite loop in mismatching PMK case on AP

Commit e61fea6b467bec0702096c795b06195584d32a6c ('SAE: Fix PMKSA caching
behavior in AP mode') modified the PSK fetching loop to not override PMK
in case of SAE with PMKSA caching. However, that commit missed the error
path cases where there is need to break from the loop with exact
negative of the check in the beginning of the loop. This could result in
hitting an infinite loop in hostapd if a station derived a different PMK
value from otherwise successfully completed SAE authentication or if a
STA used a different PMK with a PMKSA caching attempt after a previously
completed successful authentication.

Fix this by adding the matching break condition on SAE AKM within the
loops.

Fixes: e61fea6b467b ("SAE: Fix PMKSA caching behavior in AP mode")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoReject eap_server_erp hostapd.conf parameter without CONFIG_ERP=y
Jouni Malinen [Wed, 28 Feb 2018 11:09:07 +0000 (13:09 +0200)] 
Reject eap_server_erp hostapd.conf parameter without CONFIG_ERP=y

This provides an explicit error report if runtime configuration is not
valid and ERP server functionality cannot be used.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Improve QR Code scanning with zxing
Jouni Malinen [Fri, 23 Feb 2018 14:29:05 +0000 (16:29 +0200)] 
wpadebug: Improve QR Code scanning with zxing

Set SCAN_MODE to accept only QR Codes and close the scanner more
reliably after a successfully scanned QR Code.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Add activity to select method for QR Code scanning
Anurag Das [Fri, 23 Feb 2018 10:14:02 +0000 (15:44 +0530)] 
wpadebug: Add activity to select method for QR Code scanning

Add QrCodeReadActivity that makes a decision to select between InputUri
and QrCodeScannerActivity depending on the availability of the camera in
the device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Close InputUri activity automatically on DPP URI completion
Jouni Malinen [Thu, 22 Feb 2018 12:40:47 +0000 (14:40 +0200)] 
wpadebug: Close InputUri activity automatically on DPP URI completion

Check the entered text and stop automatically at the end of full DPP
URI.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Add main screen buttons for QR Code operations
Jouni Malinen [Thu, 22 Feb 2018 12:20:10 +0000 (14:20 +0200)] 
wpadebug: Add main screen buttons for QR Code operations

These can be used for manual testing of the DPP QR Code functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: A dialog activity to input the URI from QR Code Scanner
Anurag Das [Wed, 21 Feb 2018 12:35:33 +0000 (18:05 +0530)] 
wpadebug: A dialog activity to input the URI from QR Code Scanner

This should help to read the URI from the QR Code Scanner's (USB HID
devices instead of USB video device) that decodes the QR Code.
This dialog box provisions the mechanism to enter the decoded
URI code from such hardware devices.

This dialog can be used with:
am start -n w1.fi.wpadebug/w1.fi.wpadebug.InputUri

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Update default project target to android-22
Jouni Malinen [Thu, 22 Feb 2018 10:22:12 +0000 (12:22 +0200)] 
wpadebug: Update default project target to android-22

This matches the current zxing target level and as such, is more likely
to be installed on devices that build wpadebug.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Suite B tests with BoringSSL
Jouni Malinen [Fri, 16 Feb 2018 15:15:57 +0000 (17:15 +0200)] 
tests: Suite B tests with BoringSSL

Enable appropriate Suite B test cases with BoringSSL. Currently, this
means enabling only the 192-bit level ECDSA and ECDHE-RSA since
BoringSSL has removed support for DHE and there is no need to support
128-bit level ECDSA anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoBoringSSL: Set appropriate sigalgs for Suite B RSA 3K cases
Jouni Malinen [Mon, 19 Feb 2018 14:37:36 +0000 (16:37 +0200)] 
BoringSSL: Set appropriate sigalgs for Suite B RSA 3K cases

This commit takes care of the sigalg configuration using the relatively
recent SSL_CTX_set_verify_algorithm_prefs() addition from April 2017 to
address the functionality that was already there with OpenSSL using
SSL_set1_sigalgs_list().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoBoringSSL: Map OpenSSL SUITEB192 cipher into appropriate sigalgs
Jouni Malinen [Mon, 19 Feb 2018 14:25:54 +0000 (16:25 +0200)] 
BoringSSL: Map OpenSSL SUITEB192 cipher into appropriate sigalgs

BoringSSL removed the special OpenSSL cipher suite value "SUITEB192", so
need to map that to the explicit ciphersuite
(ECDHE-ECDSA-AES256-GCM-SHA384), curve (P-384), and sigalg
(SSL_SIGN_ECDSA_SECP384R1_SHA384) to allow 192-bit level Suite B with
ECDSA to be used.

This commit takes care of the sigalg configuration using the relatively
recent SSL_CTX_set_verify_algorithm_prefs() addition from April 2017.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoBoringSSL: Map OpenSSL SUITEB192 cipher into appropriate parameters
Jouni Malinen [Fri, 16 Feb 2018 15:14:16 +0000 (17:14 +0200)] 
BoringSSL: Map OpenSSL SUITEB192 cipher into appropriate parameters

BoringSSL removed the special OpenSSL cipher suite value "SUITEB192", so
need to map that to the explicit ciphersuite
(ECDHE-ECDSA-AES256-GCM-SHA384), curve (P-384), and sigalg
(SSL_SIGN_ECDSA_SECP384R1_SHA384) to allow 192-bit level Suite B with
ECDSA to be used.

This commit takes care of the ciphersuite and curve configuration.
sigalg change is in a separate commit since it requires a newer
BoringSSL API function that may not be available in all builds.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoOpenSSL: Replace SSL_set1_curves_list() with SSL_set1_curves()
Jouni Malinen [Mon, 19 Feb 2018 14:00:19 +0000 (16:00 +0200)] 
OpenSSL: Replace SSL_set1_curves_list() with SSL_set1_curves()

In practice, this does the same thing (i.e., allows only the P-384 curve
to be used), but using an older API function that happens to be
available in some BoringSSL builds while the newer one is not.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Processing of truncated RSNE fields
Jouni Malinen [Fri, 16 Feb 2018 11:55:38 +0000 (13:55 +0200)] 
tests: Processing of truncated RSNE fields

Verify that truncated RSN Capabilities field and PMKIDCount field get
ignored.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Fix Permission denied on Fedora
Masashi Honma [Sat, 30 Dec 2017 20:35:28 +0000 (05:35 +0900)] 
tests: Fix Permission denied on Fedora

On Fedora 26, start.sh fails with these error messages.

Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
...

This is because Fedora 26 uses "wheel" group as administrative group.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agoAllow HT40 on 5 GHz channels 165 and 169
Ben Greear [Wed, 3 Jan 2018 18:53:53 +0000 (10:53 -0800)] 
Allow HT40 on 5 GHz channels 165 and 169

India supports 5 GHz channels 169 and 173 now. Enable HT40 across
channels 165 and 169. Leave channel 173 to remain HT20 only.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agonl80211: Use the new NL80211_MFP_OPTIONAL option
Emmanuel Grumbach [Thu, 1 Feb 2018 14:21:57 +0000 (16:21 +0200)] 
nl80211: Use the new NL80211_MFP_OPTIONAL option

Now we can configure the network block so that it allows MFP setting for
the NL80211_CMD_CONNECT command. If the kernel finds an AP that requires
MFP, it'll be able to connect to it.

Note that since NL80211_MFP_OPTIONAL isn't supported for
NL80211_CMD_ASSOCIATE, we need to take the MFP configuration outside
nl80211_connect_common(). In addition, check that
NL80211_EXT_FEATURE_MFP_OPTIONAL is supported, to be backward compatible
with older kernels.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
6 years agowpa_supplicant: Handle port authorized event
Avraham Stern [Sun, 28 Jan 2018 12:45:37 +0000 (14:45 +0200)] 
wpa_supplicant: Handle port authorized event

When the driver indicates that the connection is authorized (i.e., the
4-way handshake was completed by the driver), cancel the EAP
authentication timeout and set the EAP state machine to success state.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agonl80211: Handle port authorized event
Avraham Stern [Sun, 28 Jan 2018 12:45:36 +0000 (14:45 +0200)] 
nl80211: Handle port authorized event

Indicate that the connection is authorized when receiving a port
authorized event from the driver.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agodriver: Add port authorized event
Avraham Stern [Sun, 28 Jan 2018 12:45:35 +0000 (14:45 +0200)] 
driver: Add port authorized event

Add an event that indicates that the 4 way handshake was completed by
the driver.

This event is useful for networks that require 802.1X authentication.
The driver can use this event that a new connection is already
authorized (e.g. when the driver used PMKSA caching) and 802.1X
authentication is not required.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agonl80211: Add API to set the PMK to the driver
Avraham Stern [Sun, 28 Jan 2018 12:45:34 +0000 (14:45 +0200)] 
nl80211: Add API to set the PMK to the driver

Add support for setting the PMK to the driver. This is used for
drivers that support 4-way handshake offload.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
6 years agonl80211: Check 4-way handshake offload support
Eliad Peller [Sun, 28 Jan 2018 12:45:33 +0000 (14:45 +0200)] 
nl80211: Check 4-way handshake offload support

Set the WPA_DRIVER_FLAGS_4WAY_HANDSHAKE flag if the driver indicates
both 4-way handshake PSK and 802.1X support. Currently wpa_supplicant
doesn't distinguish between 4-way handshake for 802.1X and PSK, but
nl80211 API has different capabilities for each one.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agonl80211: Support passing PSK on connect
Eliad Peller [Sun, 28 Jan 2018 12:45:32 +0000 (14:45 +0200)] 
nl80211: Support passing PSK on connect

If the driver advertises WPA_DRIVER_FLAGS_4WAY_HANDSHAKE support, pass
the PSK on connect.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
6 years agotests: Add option --dbus for logging D-Bus messages
Vasyl Vavrychuk [Mon, 12 Feb 2018 19:26:10 +0000 (21:26 +0200)] 
tests: Add option --dbus for logging D-Bus messages

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
6 years agotests: Document building of hostapd_cli for hwsim builds
Vasyl Vavrychuk [Mon, 12 Feb 2018 19:24:10 +0000 (21:24 +0200)] 
tests: Document building of hostapd_cli for hwsim builds

This is used in the tests, too, and was already covered by the build.sh
script, but not this README file.

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
6 years agowpa_passphrase: Include $(LIBS) for linking
Arkadiusz Drabczyk [Tue, 13 Feb 2018 22:49:08 +0000 (23:49 +0100)] 
wpa_passphrase: Include $(LIBS) for linking

wpa_passphrase requires libcrypto from OpenSSL (or another selected
library). User can set an alternative path to OpenSSL libraries by
defining LIBS at the top of .config but if $(LIBS) is not actually used
wrong libcrypto is used or compilation fails if there is no libcrypto in
the default locations cc is looking for it. It's especially bad for
cross-compilers that fail with 'cannot find -lcrypto' message.

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
6 years agoDPP: Do not include common/dpp.h without CONFIG_DPP=y
Jouni Malinen [Sat, 17 Feb 2018 16:07:43 +0000 (18:07 +0200)] 
DPP: Do not include common/dpp.h without CONFIG_DPP=y

This header file pulls in an OpenSSL header file and as such, should not
be included without CONFIG_DPP=y to avoid bringing in an unnecessary
build dependency on OpenSSL header files.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoDefine host_to_le64() for Windows builds
Jouni Malinen [Sat, 17 Feb 2018 16:04:54 +0000 (18:04 +0200)] 
Define host_to_le64() for Windows builds

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFix a typo in disassoc_low_ack documentation
Jouni Malinen [Sat, 17 Feb 2018 15:59:27 +0000 (17:59 +0200)] 
Fix a typo in disassoc_low_ack documentation

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: wpa_supplicant AP mode - open network with client isolation
Jouni Malinen [Sat, 17 Feb 2018 15:57:45 +0000 (17:57 +0200)] 
tests: wpa_supplicant AP mode - open network with client isolation

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAdd ap_isolate configuration option for wpa_supplicant AP mode
Danilo Ravotto [Thu, 1 Feb 2018 11:09:38 +0000 (12:09 +0100)] 
Add ap_isolate configuration option for wpa_supplicant AP mode

Allow client isolation to be configured with ap_isolate inside
wpa_supplicant configuration file.

Signed-off-by: Danilo Ravotto <danilo.ravotto@zirak.it>
6 years agotests: Fix dbus_set_global_properties failure if run twice
Jouni Malinen [Sat, 17 Feb 2018 15:41:57 +0000 (17:41 +0200)] 
tests: Fix dbus_set_global_properties failure if run twice

Clear the model_name parameter back to the default (empty string) at the
beginning and the end of dbus_set_global_properties to avoid failures if
the test case is run multiple times.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Make dbus_p2p_discovery more robust
Jouni Malinen [Sat, 17 Feb 2018 15:21:05 +0000 (17:21 +0200)] 
tests: Make dbus_p2p_discovery more robust

Ignore any unexpected deviceLost event before the peer devices has been
discovered. This works around issues where the previous test case
terminates before the D-Bus events have been fully delivered. This could
happen, e.g., when running dbus_p2p_discovery twice in a row.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoExtend APF interface for read/write and enable/disable ops
Vamsi Krishna [Fri, 12 Jan 2018 07:12:58 +0000 (12:42 +0530)] 
Extend APF interface for read/write and enable/disable ops

Enhance QCA vendor specific APF interface to support write/read program
and/or data and to enable/disable APF feature.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoOpenSSL: Fix EAP-FAST with OpenSSL 1.1.1-pre1
Jouni Malinen [Wed, 14 Feb 2018 10:40:33 +0000 (12:40 +0200)] 
OpenSSL: Fix EAP-FAST with OpenSSL 1.1.1-pre1

TLS v1.3 needs to be explicitly disabled to allow cipher suite selection
for EAP-FAST to work with OpenSSL builds that include TLS v1.3 support.
Without this, OpenSSL refuses to generate ClientHello due to the cipher
suite list including only ciphers allowed with older versions than TLS
v1.3.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: sigma_dut controlled STA as DPP PKEX responder and error case
Jouni Malinen [Mon, 12 Feb 2018 22:24:50 +0000 (00:24 +0200)] 
tests: sigma_dut controlled STA as DPP PKEX responder and error case

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoOWE: Add testing RSNE for OWE assoc response with driver SME/MLME
Ashok Ponnaiah [Mon, 12 Feb 2018 11:57:12 +0000 (17:27 +0530)] 
OWE: Add testing RSNE for OWE assoc response with driver SME/MLME

Allow RSNE to be overwritten for testing purposes also in the
driver-based SME/MLME case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoDPP: Use wildcard BSSID in GAS query frames
Jouni Malinen [Sat, 10 Feb 2018 10:42:00 +0000 (12:42 +0200)] 
DPP: Use wildcard BSSID in GAS query frames

Force use of the wildcard BSSID address in GAS query frames with DPP
regardless of how the gas_address3 configuration parameter is set. DPP
specification mandates this and the use of GAS here is really outside
the context of a BSS, so using the wildcard BSSID makes sense even for
the corner case of Configurator running on a known AP (where IEEE 802.11
standard would allow the BSSID of the AP to be used).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agonl80211: Do not try to add too large NL80211_ATTR_PMK for set/del PMKSA
Jouni Malinen [Sat, 10 Feb 2018 10:16:53 +0000 (12:16 +0200)] 
nl80211: Do not try to add too large NL80211_ATTR_PMK for set/del PMKSA

The current cfg80211 limit for the maximum NL80211_ATTR_PMK length is
48, so anything larger than that will result in the operation completely
failing. Since the PMKSA entries can be used without the PMK for most
purposes (the main use case for PMK currently is offloaded FILS
authentication), try to go ahead by configuring only the PMKID for the
case where 64-octet PMK is needed (which is currently limited to only
DPP with NIST P-521 and brainpoolP512r1 curves). This can fix DPP
connections with drivers that expect to get the PMKID through this
interface while still leaving the actual 4-way handshake for user space.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agonl80211: Print NL80211_CMD_{SET,DEL}_PMKSA failures in debug log
Jouni Malinen [Sat, 10 Feb 2018 10:10:07 +0000 (12:10 +0200)] 
nl80211: Print NL80211_CMD_{SET,DEL}_PMKSA failures in debug log

This makes it easier to notice if the driver operation to manage PMKSA
cache information fails unexpectedly.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agowpadebug: Add support for QR Code scanning and display via zxing
Purushottam Kushwaha [Tue, 30 Jan 2018 15:05:46 +0000 (20:35 +0530)] 
wpadebug: Add support for QR Code scanning and display via zxing

Enhance wpadebug application to support scanning and displaying of QR
codes. This depends on a third-party source: zxing
(https://github.com/zxing/zxing).

Shell command to launch scanner/viewer via wpadebug is:
>adb root
>adb shell

Scanner:
>am start -n w1.fi.wpadebug/w1.fi.wpadebug.QrCodeScannerActivity
Viewer:
>am start -n w1.fi.wpadebug/w1.fi.wpadebug.QrCodeDisplayActivity

QR code string input/output file would be generated in
'/sdcard/wpadebug_qrdata.txt' in the device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: MAC ACL accept/deny management
Jouni Malinen [Wed, 7 Feb 2018 17:45:32 +0000 (19:45 +0200)] 
tests: MAC ACL accept/deny management

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agohostapd: Dynamic MAC ACL management over control interface
Tamizh chelvam [Thu, 11 Jan 2018 09:59:03 +0000 (15:29 +0530)] 
hostapd: Dynamic MAC ACL management over control interface

Previously, MAC ACL could be modified only through file operations
(modify accept/deny_mac_file and reload it to hostapd). Extend this to
allow MAC ACL to be modified and displayed through new control interface
commands:

ACCEPT_ACL <subcmd> [argument]
DENY_ACL <subcmd> [argument]

subcmd: ADD_MAC <addr>[ VLAN_ID=<id>]|DEL_MAC <addr>|SHOW|CLEAR

Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
6 years agoDPP: Fix GAS query removal race condition on DPP_STOP_LISTEN
Jouni Malinen [Wed, 7 Feb 2018 16:03:58 +0000 (18:03 +0200)] 
DPP: Fix GAS query removal race condition on DPP_STOP_LISTEN

If a DPP_STOP_LISTEN call happens to be received when there is a pending
gas-query radio work that has not yet been started, it was possible for
gas_query_stop() to go through gas_query_done() processing with
gas->work == NULL and that ended up with the pending GAS query getting
freed without removing the pending radio work that hold a reference to
the now freed memory. Fix this by removing the pending non-started radio
work for the GAS query in this specific corner case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Make dpp_qr_code_curve_select more robust
Jouni Malinen [Wed, 7 Feb 2018 15:09:20 +0000 (17:09 +0200)] 
tests: Make dpp_qr_code_curve_select more robust

Wait for the configuration exchange to complete before issuing the
DPP_STOP_LISTEN command to avoid confusing sequence of operation between
the ongoing and immediately following DPP exchanges.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: DPP and PKEX on 5 GHz
Jouni Malinen [Wed, 7 Feb 2018 14:58:52 +0000 (16:58 +0200)] 
tests: DPP and PKEX on 5 GHz

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoDPP: PKEX initiation on other bands
Jouni Malinen [Wed, 7 Feb 2018 14:56:43 +0000 (16:56 +0200)] 
DPP: PKEX initiation on other bands

Add support for wpa_supplicant to try to initiate PKEX on 5 GHz and 60
GHz bands in addition to the previously available 2.4 GHz case. If no
response from a peer device is seen on the 2.4 GHz band (channel 6) for
the five attempts, try the other PKEX channels (5 GHz channels 44 and
149; and 60 GHz channel 2) if they are supported and allowed for
initiating radiation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Make owe_transition_mode_multi_bss more robust
Jouni Malinen [Wed, 7 Feb 2018 11:45:48 +0000 (13:45 +0200)] 
tests: Make owe_transition_mode_multi_bss more robust

Fix bssid2 value to make scanning more reliable for the second OWE BSS.
In addition, reorder the STA status checks to happen before the data
connectivity check to get more accurate failure reason into the log if
the test case fails.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoieee802_11_mgmt: Handle frame info more consistently
Jouni Malinen [Wed, 7 Feb 2018 10:34:41 +0000 (12:34 +0200)] 
ieee802_11_mgmt: Handle frame info more consistently

Check for the fi parameter to be non-NULL before trying to fetch the
ssi_signal information similarly to how the fi->freq was already
handled. While the meta information is supposed to be available, it
looks like there is at least one corner case where fi == NULL could be
used (Authentication frame reprocessing after RADIUS-based ACL).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoSAE: Reject request with mismatching PMKID (no PMKSA cache entry)
Ashok Ponnaiah [Wed, 7 Feb 2018 10:16:20 +0000 (12:16 +0200)] 
SAE: Reject request with mismatching PMKID (no PMKSA cache entry)

Reject SAE association request when PMKID is included in the RSNE, but
the corresponding PMKSA is not available in the AP.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agoDefine new QCA vendor sub command for wifi test configuration
Kiran Kumar Lokere [Fri, 2 Feb 2018 22:14:34 +0000 (14:14 -0800)] 
Define new QCA vendor sub command for wifi test configuration

Define a new QCA vendor sub command for configuring the device with wifi
test configuration. Add new test config attributes for this sub command
that are used to configure the device for testbed configuration.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: sigma_dut DPP roles incompatible
Jouni Malinen [Tue, 6 Feb 2018 20:07:57 +0000 (22:07 +0200)] 
tests: sigma_dut DPP roles incompatible

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoDPP: Require use of PMF for DPP AKM
Jouni Malinen [Tue, 6 Feb 2018 18:54:55 +0000 (20:54 +0200)] 
DPP: Require use of PMF for DPP AKM

Previously, wpa_supplicant set PMF as optional for the DPP AKM since
there was no clear statement about this requirement in the tech spec.
Now that this requirement has been added, update the implementation to
match. In addition, set ssid->ieee80211w using the actual enum
mfp_options values instead of magic constants to make this a bit more
readable.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Enable PMF in sigma_dut DPP tests
Jouni Malinen [Tue, 6 Feb 2018 20:07:30 +0000 (22:07 +0200)] 
tests: Enable PMF in sigma_dut DPP tests

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Use PMF in DPP with legacy PSK/SAE cases
Jouni Malinen [Tue, 6 Feb 2018 18:52:44 +0000 (20:52 +0200)] 
tests: Use PMF in DPP with legacy PSK/SAE cases

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoOWE: Rename function to match use (driver-SME/MLME)
Ashok Ponnaiah [Tue, 6 Feb 2018 18:27:41 +0000 (20:27 +0200)] 
OWE: Rename function to match use (driver-SME/MLME)

This function is used to process a (Re)Association Request frame, so
rename it appropriately to mention assoc_req instead of auth_req.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agoOWE: Check for ECDH availability before use (driver-SME/MLME)
Ashok Ponnaiah [Tue, 6 Feb 2018 18:25:41 +0000 (20:25 +0200)] 
OWE: Check for ECDH availability before use (driver-SME/MLME)

Verify that the STA has ECDH data available before trying to use this
data to add the OWE DH Params element.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agoOWE: Add RSNE when not using PMKSA caching (driver-SME/MLME)
Ashok Ponnaiah [Tue, 6 Feb 2018 18:22:53 +0000 (20:22 +0200)] 
OWE: Add RSNE when not using PMKSA caching (driver-SME/MLME)

RSNE needs to be added both with and without use of PMKSA caching.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agoOWE: Support DH groups 20 and 21 with driver-SME/MLME
Ashok Ponnaiah [Tue, 6 Feb 2018 18:20:22 +0000 (20:20 +0200)] 
OWE: Support DH groups 20 and 21 with driver-SME/MLME

This was already the case with the hostapd-based SME/MLME
implementation, but the OWE DH Param element construction for the
driver-based SME/MLME needed a matching change to set the group
properly.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
6 years agotests: Run owe test with PMF required
Jouni Malinen [Tue, 6 Feb 2018 16:55:18 +0000 (18:55 +0200)] 
tests: Run owe test with PMF required

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: WPA2-PSK-FT AP with PSK from a file
Jouni Malinen [Sun, 4 Feb 2018 10:40:03 +0000 (12:40 +0200)] 
tests: WPA2-PSK-FT AP with PSK from a file

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agohostapd: Fix wpa_psk_file support for FT-PSK
Michal Kazior [Thu, 1 Feb 2018 11:03:28 +0000 (12:03 +0100)] 
hostapd: Fix wpa_psk_file support for FT-PSK

For FT-PSK sm->xxkey was populated with only the first password on the
linked list (i.e., last matching password in the wpa_psk_file) in
INITPSK. This caused only that password to be recognized and accepted.
All other passwords were not verified properly and subsequently
prevented clients from connecting.

Hostapd would report:

 Jan 30 12:55:44 hostapd: ap0: STA xx:xx:xx:xx:xx:xx WPA: sending 1/4 msg of 4-Way Handshake
 Jan 30 12:55:44 hostapd: ap0: STA xx:xx:xx:xx:xx:xx WPA: received EAPOL-Key frame (2/4 Pairwise)
 Jan 30 12:55:44 hostapd: ap0: STA xx:xx:xx:xx:xx:xx WPA: invalid MIC in msg 2/4 of 4-Way Handshake
 Jan 30 12:55:45 hostapd: ap0: STA xx:xx:xx:xx:xx:xx WPA: EAPOL-Key timeout

Signed-off-by: Michal Kazior <michal@plumewifi.com>
6 years agowpa_supplicant: Fix parsing errors on additional config file
Jouni Malinen [Sun, 4 Feb 2018 10:20:13 +0000 (12:20 +0200)] 
wpa_supplicant: Fix parsing errors on additional config file

If the -I<config> argument is used and the referenced configuration file
cannot be parsed, wpa_config_read() ended up freeing the main
configuration data structure and that resulted in use of freed memory in
such an error case. Fix this by not freeing the main config data and
handling the error case in the caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agowpa_supplicant: Free config only if it was allocated in same call
Dmitry Shmidt [Thu, 1 Feb 2018 00:34:54 +0000 (00:34 +0000)] 
wpa_supplicant: Free config only if it was allocated in same call

If option -I:config points to a non-existing file, the the previously
allocated config must not be freed. Avoid use of freed memory in such an
error case by skipping the incorrect freeing operation.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
6 years agotests: Enable device PS before sending PS-Poll
Adiel Aloni [Tue, 30 Jan 2018 11:10:10 +0000 (13:10 +0200)] 
tests: Enable device PS before sending PS-Poll

Linux kernel commit c9491367b759 ("mac80211: always update the PM state
of a peer on MGMT / DATA frames") enforces the AP to check only
mgmt/data frames PM bit, and to update station's power save accordingly.
When sending only a PS-Poll (control frame) the AP will ignore the PM
bit. As the result, the partial virtual bitmap will not be updated, and
the test ap_open_disconnect_in_ps will fail on tshark check. Since the
test needs only the TIM to be updated, setting PS enabled will send NDP
that will signal that the station is sleeping. Sending PS-Poll to enable
power save is not correct, according to the following standard
statement: "A PS-Poll frame exchange does not necessarily result in an
Ack frame from the AP, so a non-AP STA cannot change power management
mode using a PS-Poll frame."

Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
6 years agoOWE: Fix association IEs for transition mode open AP connection
Jouni Malinen [Sun, 4 Feb 2018 09:55:01 +0000 (11:55 +0200)] 
OWE: Fix association IEs for transition mode open AP connection

The special case of returning from wpa_supplicant_set_suites() when OWE
transition mode profile is used for an open association did not clear
the wpa_ie buffer length properly. This resulted in trying to use
corrupted IEs in the association request and failed association
(cfg80211 rejects the request or if the request were to go out, the AP
would likely reject it).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agowpa_cli: Enable add/remove/get vendor elements without P2P
Simon Dinkin [Thu, 1 Feb 2018 15:12:02 +0000 (17:12 +0200)] 
wpa_cli: Enable add/remove/get vendor elements without P2P

This functionality can be used regardless of P2P and should not be under
the ifdef of CONFIG_P2P.

Signed-off-by: Simon Dinkin <simon.dinkin@tandemg.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agocommon: Fix the description of wpa_ctrl_request() function
Simon Dinkin [Thu, 1 Feb 2018 15:12:03 +0000 (17:12 +0200)] 
common: Fix the description of wpa_ctrl_request() function

The blocking timeout of this function was changed from 2 seconds to 10
seconds in this commit 1480633f ("Use longer timeout in
wpa_ctrl_request()"), but the description was never changed accordingly.

Signed-off-by: Simon Dinkin <simon.dinkin@tandemg.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 years agoFix compiler issue with CONFIG_TESTING_OPTIONS
David Messer [Wed, 31 Jan 2018 16:01:00 +0000 (11:01 -0500)] 
Fix compiler issue with CONFIG_TESTING_OPTIONS

Use the preprocessor conditional "ifdef" instead of "if" before
CONFIG_TESTING_OPTIONS to prevent an issue on build systems that treat
undefined preprocessor identifiers as an error.

Signed-off-by: David Messer <david.messer@garmin.com>
6 years agoD-Bus: Report error on starting P2P find
Vasyl Vavrychuk [Thu, 1 Feb 2018 12:07:30 +0000 (14:07 +0200)] 
D-Bus: Report error on starting P2P find

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
6 years agowpa_cli: Fix cred_fields[] declaration
Jouni Malinen [Sat, 3 Feb 2018 10:08:09 +0000 (12:08 +0200)] 
wpa_cli: Fix cred_fields[] declaration

This was supposed to be an array of const-pointers to const-char; not
something duplicating const for char and resulting in compiler warnings
with more recent gcc versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoSAE: Support external authentication offload for driver-SME cases
Sunil Dutt [Thu, 1 Feb 2018 11:31:28 +0000 (17:01 +0530)] 
SAE: Support external authentication offload for driver-SME cases

Extend the SME functionality to support the external authentication.
External authentication may be used by the drivers that do not define
separate commands for authentication and association
(~WPA_DRIVER_FLAGS_SME) but rely on wpa_supplicant's SME for the
authentication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: SAE with connect command
Jouni Malinen [Fri, 2 Feb 2018 17:08:34 +0000 (19:08 +0200)] 
tests: SAE with connect command

This does not really work with mac80211_hwsim due to missing offload
support, but at least some minimal extra code coverage can be achieved.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agonl80211: Create a netlink socket handle for the Connect interface
Sunil Dutt [Thu, 1 Feb 2018 11:22:57 +0000 (16:52 +0530)] 
nl80211: Create a netlink socket handle for the Connect interface

This netlink socket handle owns the connect request and is further used
by the host driver/kernel to request for the external authentication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>