mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(esp_wifi): Add ESP-IDF specific changes for OWE Only softap
1) Add OWE-Only Support in ESP-IDF softAP example 2) Add changes in documentation
This commit is contained in:
@@ -25,6 +25,13 @@
|
|||||||
#include "ap/wpa_auth_i.h"
|
#include "ap/wpa_auth_i.h"
|
||||||
#define OWE_DH_GRP19 19
|
#define OWE_DH_GRP19 19
|
||||||
#define OWE_DHIE_LEN 37
|
#define OWE_DHIE_LEN 37
|
||||||
|
/*
|
||||||
|
OWE_DHIE_LEN = 1 byte {WLAN_EID_EXTENSION}
|
||||||
|
+ 1 byte {len of DHIE (1(pub_key len) + 2(dh group) + 32(len of pub_key)) = 35)}
|
||||||
|
+ 1 byte {pub_key len}
|
||||||
|
+ 2 bytes {DH group}
|
||||||
|
+ 32 bytes {public key}
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SAE
|
#ifdef CONFIG_SAE
|
||||||
@@ -841,7 +848,6 @@ uint16_t owe_process_assoc_req(struct hostapd_data *hapd, struct sta_info *sta,
|
|||||||
"OWE: Try to reuse own previous DH key since the STA tried to go through OWE association again");
|
"OWE: Try to reuse own previous DH key since the STA tried to go through OWE association again");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
crypto_ecdh_deinit(sta->owe_ecdh);
|
|
||||||
sta->owe_ecdh = crypto_ecdh_init(OWE_DH_GRP19);
|
sta->owe_ecdh = crypto_ecdh_init(OWE_DH_GRP19);
|
||||||
if (!sta->owe_ecdh) {
|
if (!sta->owe_ecdh) {
|
||||||
wpa_printf(MSG_ERROR, "OWE: Error initializing ECDH for STA");
|
wpa_printf(MSG_ERROR, "OWE: Error initializing ECDH for STA");
|
||||||
|
|||||||
@@ -157,10 +157,17 @@ Enhanced Open™ is used for providing security and privacy to users connecting
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
{IDF_TARGET_NAME} supports Wi-Fi Enhanced Open™ only in station mode.
|
{IDF_TARGET_NAME} supports Wi-Fi Enhanced Open™ (OWE Transition Mode + OWE Only) in station mode and (OWE Only) in softap mode.
|
||||||
|
|
||||||
|
|
||||||
Setting up OWE with {IDF_TARGET_NAME}
|
Setting up OWE with {IDF_TARGET_NAME}
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
For station mode :
|
||||||
|
|
||||||
A configuration option :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA` and configuration parameter :cpp:type:`owe_enabled` in :cpp:type:`wifi_sta_config_t` is provided to enable OWE support for the station. To use OWE transition mode, along with the configuration provided above, `authmode` from :cpp:type:`wifi_scan_threshold_t` should be set to ``WIFI_AUTH_OPEN``.
|
A configuration option :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA` and configuration parameter :cpp:type:`owe_enabled` in :cpp:type:`wifi_sta_config_t` is provided to enable OWE support for the station. To use OWE transition mode, along with the configuration provided above, `authmode` from :cpp:type:`wifi_scan_threshold_t` should be set to ``WIFI_AUTH_OPEN``.
|
||||||
|
|
||||||
|
|
||||||
|
For softap mode :
|
||||||
|
|
||||||
|
A configuration option :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_SOFTAP` from menuconfig and configuration parameter :cpp:type:`owe_enabled` in :cpp:type:`wifi_ap_config_t` should be enabled and configuration parameter `authmode` from :cpp:type:`wifi_ap_config_t` should be set to ``WIFI_AUTH_OWE``.
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ void wifi_init_softap(void)
|
|||||||
.gtk_rekey_interval = EXAMPLE_GTK_REKEY_INTERVAL,
|
.gtk_rekey_interval = EXAMPLE_GTK_REKEY_INTERVAL,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (strlen(EXAMPLE_ESP_WIFI_PASS) == 0) {
|
if (strlen(EXAMPLE_ESP_WIFI_PASS) == 0 &&
|
||||||
|
(wifi_config.ap.authmode != WIFI_AUTH_OWE || !wifi_config.ap.owe_enabled)) {
|
||||||
wifi_config.ap.authmode = WIFI_AUTH_OPEN;
|
wifi_config.ap.authmode = WIFI_AUTH_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user