Commit graph

108 commits

Author SHA1 Message Date
David Cermak
62f9f42b54 wpa_supplicant: ignore static analysis violations 2020-03-27 19:17:36 +01:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Jiang Jiang Jian
2e7ae75011 Merge branch 'bugfix/wep40_key_parsing_bug' into 'master'
wpa_supplicant: Add parsing support for WEP40 key

See merge request espressif/esp-idf!7968
2020-03-17 15:42:02 +08:00
Marius Vikhammer
7e824508a9 mpi: refactor bignum into common and hw specific components
Closes IDF-1174
2020-03-16 19:44:30 +08:00
kapil.gupta
0ae58fc59f wpa_supplicant: Add parsing support for WEP40 key
WEP key is passed as ascii key without "", add parsing support
in supplicant for this.
2020-03-16 06:14:19 +00:00
Marius Vikhammer
e21bef3f28 mpi: active hw accel for S2
Actives MPI/RSA hardware acceleratio for ESP32 S2.

Closes IDF-803
2020-03-13 18:33:18 +08:00
Nachiket Kukade
30d6220394 esp_wifi: Support for additional WPA3 testcases
1. Anti-Clogging Token Request support
2. Return correct status from SAE modules for invalid scenarios
3. Add PMK Caching support for WPA3
2020-03-03 19:01:51 +05:30
Sagar Bijwe
0f1710d878 wpa_supplicant: Fix SAE test-case failure on mbedtls version udpate
Problem:
mbedtls_ctr_drbg_context was initialized in crypto_ec_point_mul. This
was okay in releases before 2.16.4 as entropy_len used to get set to
MBEDTLS_CTR_DRBG_ENTROPY_LEN in function mbedtls_ctr_drbg_seed. The
function is now changed to set the length to
MBEDTLS_CTR_DRBG_ENTROPY_LEN if previous length is 0 and hence the bug.

Solution:
Initialize mbedtls_ctr_drbg_context in crypto_ec_point_mul.
2020-02-26 17:50:08 +05:30
michael
2529eda907 ci: disable failed cases for s2 temporarily 2020-02-15 18:28:25 +08:00
Jiang Jiang Jian
7647b5c668 Merge branch 'bugfix/eapol_log_verbosity' into 'master'
wpa_supplicant: Add wpa_supllicant debug logging as a configurable option

Closes WIFI-976

See merge request espressif/esp-idf!7289
2020-02-11 16:10:07 +08:00
David Cermak
50588ff3f7 esp-compiler: add designated init macros to make esp configuration pattern viable under C++ 2020-02-10 19:40:28 +01:00
Angus Gratton
98618333a1 Merge branch 'bugfix/wps_config_init' into 'master'
WPS_CONFIG_INIT_DEFAULT(type) error

See merge request espressif/esp-idf!7311
2020-02-06 14:04:31 +08:00
Konstantin Kondrashov
739eb05bb9 esp32: add implementation of esp_timer based on TG0 LAC timer
Closes: IDF-979
2020-02-06 14:00:18 +08:00
Hrudaynath Dhabe
9ebd2cc0f6 Fix wps config for support with gnu++11 as well as c99. 2020-01-31 05:36:41 +00:00
Hrudaynath Dhabe
ec50c5344b wpa_supplicant: Fix configurable debug log feature's warning issue 2020-01-31 05:34:07 +00:00
GOPTIONS\pfrost
851658109c Reduce log level of hexdumps to verbose
Revert "Reduce log level of hexdumps to verbose"

Add a menuconfig option to enable or disable the logging in wpa_supplicant

Clarify help message
2020-01-31 05:34:07 +00:00
morris
e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
morris
1c2cc5430e global: bring up esp32s2(not beta) 2020-01-16 17:41:31 +08:00
Konstantin Kondrashov
2c793cef06 idf: Support a custom toolchain with time_t wide 64-bits
Allows resolving the Y2K38 problem.

Closes: IDF-350

Closes: https://github.com/espressif/esp-idf/issues/584
2020-01-10 12:58:54 +08:00
liu zhifu
fde2f33912 esp_wifi/supplicant: fix some WiFi stop memory leak 2019-12-18 13:51:27 +08:00
Marius Vikhammer
c63684cf6c hw crypto: activated hardware acceleration for esp32s2beta
Activated AES, RSA and SHA hardware acceleration for esp32s2 and enabled related unit tests.

Updated with changes made for ESP32 from 0a04034, 961f59f and caea288.

Added performance targets for esp32s2beta

Closes IDF-757
2019-12-12 12:37:29 +08:00
Ivan Grokhotkov
4872dcea2e wpa_supplicant: remove header file MD5 unit test 2019-11-27 23:00:11 +08:00
Nachiket Kukade
5618cf5100 wpa_supplicant: Fix MD5 mismatch in esp_wifi_driver.h
Make cosmetic changes in esp_wifi_driver.h in both IDF
and wifi library to match the md5sum.
2019-11-27 12:43:04 +00:00
Nachiket Kukade
f2e37c4ca8 wpa_supplicant: Support WPA3 4-way handshake, add config option
1. Add changes in 4-way handshake path to allow SAE key mgmt.
2. Support for configuring WAP3 at init time, added Kconfig option.
3. Handle and propagate error conditions properly.
4. Link changes from WiFi library.
2019-11-26 10:59:55 +05:30
Nachiket Kukade
da07b2b4a7 wpa_supplicant: Add SAE handshake support for WPA3-PSK
Under WPA3-Personal, SAE authentication is used to derive PMK
which is more secure and immune to offline dictionary attacks.
1. Add modules to generate SAE commit/confirm for the handshake
2. Add modules that build and parse SAE data in Auth frames
3. Add WPA3 association and key mgmt definitions
4. Invert y-bit while solving for ECC co-ordinate -
     Once an X co-ordinate is obtained, solving for Y co-ordinate
     using an elliptical curve equation results in 2 possible values,
     Y and (P - Y), where p is the prime number. The co-ordinates are
     used for deriving keys in SAE handshake. As par the 802.11 spec
     if LSB of X is same as LSB of Y then Y is chosen, (P - Y) otherwise.
     This is not what is implemented, so fix this behavior to obtain the
     correct Y co-ordinate.
2019-11-26 04:24:57 +00:00
Sagar Bijwe
aceb141d2b wpa_supplicant: Adding SAE modules with testcase
This change ports SAE(Simultaneous Authentication of Equals)
feature from wpa_supplicant and makes it work with mbedtls
crypto APIs. Currently only group 19 is supported. A sample
SAE handshake is included in the testcase. Other minor
changes for DH groups are also included.
2019-11-26 04:24:57 +00:00
Nachiket Kukade
75ea0df916 Add encryption/decryption support for PMF
1. Add CCMP, AES crypto modules for unicast protected Mgmt frames
2. Add support for computing SHA256 MIC on Bcast Mgmt frames
3. Add support for storing iGTK during 4-way handshake.
4. Provide APIs to MLME for utilizing the SW crypto modules
5. Link PMF changes from WiFi library submodule
2019-11-25 04:11:09 +00:00
Nachiket Kukade
773e095a65 Add support for PMF configuration and negotiation
1. Add APIs for configuring PMF through set config.
2. Map Supplicant and Wifi Cipher types.
3. Add support for PMF negotiation while generating RSN IE.
2019-11-25 04:11:09 +00:00
Hrudaynath Dhabe
e543dbfe79 wpa_supplicant: Set assoc_ie_len based on generated RSN/WPA IE 2019-11-11 23:22:14 +08:00
Jiang Jiang Jian
cb6e2fc858 Merge branch 'feature/wifi_pmk_caching' into 'master'
wifi: Add PMK caching feature for station WPA2-enterprise

Closes IDF-969

See merge request espressif/esp-idf!6156
2019-11-01 15:11:20 +08:00
Hrudaynath Dhabe
4d3356be52 wifi: Add PMK caching feature for station WPA2-enterprise
4. Pmksa cache expiry after dot11RSNAConfigPMKLifetime timeout.
2019-10-31 10:51:30 +00:00
Sagar Bijwe
bd5d086475 wifi: Add PMK caching feature for station WPA2-enterprise
1) Added PMK caching module from wpa_supplicant.
2) Modified wpa_sm to
    a) Add entry to PMK cache when first time associated to an AP.
    b) Maintain entry across the associations.
    c) Clear current PMKSA when deauth happens.
    d) Search for an entry when re-associating to the same AP and
       set it as current PMKSA
    e) Wait for msg 1/4 from AP instead of starting EAP authentication.
    f) Check PMKID in msg 1 with current PMKSA/cache.
    g) Use the cached PMK to complete 4-way handshake.
3) Remove config_bss callback as it was redundant and used to cause
   problems for PMK caching flow.

Closes IDF-969
2019-10-31 10:51:30 +00:00
liu zhifu
b09624e89a esp_wifi: fix WiFi deinit memory leak 2019-10-30 10:12:15 +08:00
Angus Gratton
496ede9bcd Merge branch 'master' into feature/esp32s2beta_merge 2019-10-15 14:59:27 +11:00
Hrudaynath Dhabe
ac0b4c184d wpa_supplicant: Make hexdump logs more compact
When running with wpa debug prints enabled data/key hexdumps are
printed to the log in a really verbose format (one byte per line).

Make these printouts more compact. 16 bytes per line.
2019-10-14 23:37:51 +08:00
Angus Gratton
adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Ivan Grokhotkov
bf68285689 Merge branch 'feature/compile_option_O0' into 'master'
build_system: add new compiler optimization levels

See merge request espressif/esp-idf!5686
2019-09-17 16:54:55 +08:00
Angus Gratton
438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Andrew
4fdaeb6b6e cmake: Add new compiler optimization levels definitions
Rename and add multiple kconfig compiler options. New compiler options
COMPILER_OPTIMIZATION_PERF and COMPILER_OPTIMIZATION_NONE have been added.
Optimize "Debug" and "Release" options to "Default" and "Size" respectively.
This commit also does the following:

- The COMPILER_OPTIMIZATION_PERF option introduced multiple bug.
This commit fixes those bugs.
- build.yml also updated to test for the new optimization options.
2019-09-06 17:37:19 +08:00
Nachiket Kukade
5df2e6b19c wpa_supplicant: Fix EAP Re-authentication issue
EAP reauth frames are dropped at various stages due to current
implementation of WPA2 ENT states and EAP SM init/deinit logic.
Route EAPOL frames based on EAP pkt type and maintain EAP SM
to facilitate EAP re-authentication process.

The full fix for the change includes a fix from wifi library
(commit - 36f99df849214fbf9b0d15e58554632a568e05aa).
2019-09-06 14:59:05 +05:30
Michael (XIAO Xufeng)
76a3a5fb48 ci: disable unavailable tests for esp32s2beta 2019-09-04 10:53:25 +10:00
Jiang Jiang Jian
8db44f67d7 Merge branch 'bugfix/wps_workaround_for_Telstra_AP' into 'master'
wps: Relax the check on older config methods in case of WPS2.0

See merge request espressif/esp-idf!5781
2019-08-23 17:32:46 +08:00
Nachiket Kukade
19a1af88a5 wps: Relax the check on older config methods in case of WPS2.0
Some APs incorrectly advertize newer WPS2.0 config method bits
without setting bits for the corresponding older methods. This
results in failures during 8-way handshake. Add a workaround to
relax this check so that WPS handshake can proceed.
2019-08-20 09:58:41 +00:00
liu zhifu
003a9872b7 esp_wifi: wifi support new event mechanism
1. WiFi support new event mechanism
2. Update examples to use new event mechanism
2019-08-20 09:39:51 +00:00
Angus Gratton
0a0bb09585 Merge 'master' into feature/esp32s2beta_update 2019-08-20 13:55:23 +10:00
Angus Gratton
6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Nachiket Kukade
9ec363a25d wpa_supplicant: Make internally used crypto headers private
A lot of internally used crypto headers are publicly includeable
in user projects. This leads to bug reports when these headers
are incorrectly used or the API's are not used as intended.

Move all crypto headers into private crypto src folder, also move
crypto_ops into Supplicant to remove dependecy on crypto headers.

Closes IDF-476
2019-08-17 11:48:37 +00:00
Angus Gratton
8f74271d5d esp_rom: Fail immediately if the wrong SoC's header file is included 2019-08-12 16:57:40 +10:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton
24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00