esp_example: Enable MbedTLS for DPP enrollee by default

This commit is contained in:
Kapil Gupta
2022-01-04 11:34:06 +05:30
committed by BOT
parent 6e826523b1
commit bac4173161
5 changed files with 38 additions and 25 deletions

View File

@@ -5,7 +5,6 @@ set(srcs "port/os_xtensa.c"
"src/ap/wpa_auth_ie.c" "src/ap/wpa_auth_ie.c"
"src/common/sae.c" "src/common/sae.c"
"src/common/wpa_common.c" "src/common/wpa_common.c"
"src/common/dpp.c"
"src/utils/bitfield.c" "src/utils/bitfield.c"
"src/crypto/aes-siv.c" "src/crypto/aes-siv.c"
"src/crypto/sha256-kdf.c" "src/crypto/sha256-kdf.c"
@@ -59,8 +58,7 @@ set(esp_srcs "esp_supplicant/src/esp_wpa2.c"
"esp_supplicant/src/esp_wpa_main.c" "esp_supplicant/src/esp_wpa_main.c"
"esp_supplicant/src/esp_wpas_glue.c" "esp_supplicant/src/esp_wpas_glue.c"
"esp_supplicant/src/esp_wps.c" "esp_supplicant/src/esp_wps.c"
"esp_supplicant/src/esp_wpa3.c" "esp_supplicant/src/esp_wpa3.c")
"esp_supplicant/src/esp_dpp.c")
if(CONFIG_ESP_WIFI_SOFTAP_SUPPORT) if(CONFIG_ESP_WIFI_SOFTAP_SUPPORT)
set(esp_srcs ${esp_srcs} "esp_supplicant/src/esp_hostap.c") set(esp_srcs ${esp_srcs} "esp_supplicant/src/esp_hostap.c")
endif() endif()
@@ -162,13 +160,22 @@ if(CONFIG_WPA_11KV_SUPPORT)
else() else()
set(roaming_src "") set(roaming_src "")
endif() endif()
if(CONFIG_WPA_MBO_SUPPORT) if(CONFIG_WPA_MBO_SUPPORT)
set(mbo_src "src/common/mbo.c") set(mbo_src "src/common/mbo.c")
else() else()
set(mbo_src "") set(mbo_src "")
endif() endif()
idf_component_register(SRCS "${srcs}" ${esp_srcs} "${tls_src}" "${roaming_src}" "${crypto_src}" "${mbo_src}" if(CONFIG_WPA_DPP_SUPPORT)
set(dpp_src "src/common/dpp.c"
"esp_supplicant/src/esp_dpp.c")
else()
set(dpp_src "")
endif()
idf_component_register(SRCS "${srcs}" ${esp_srcs} "${tls_src}" "${roaming_src}"
"${crypto_src}" "${mbo_src}" "${dpp_src}"
INCLUDE_DIRS include port/include esp_supplicant/include INCLUDE_DIRS include port/include esp_supplicant/include
PRIV_INCLUDE_DIRS src src/utils esp_supplicant/src PRIV_INCLUDE_DIRS src src/utils esp_supplicant/src
PRIV_REQUIRES mbedtls esp_timer) PRIV_REQUIRES mbedtls esp_timer)
@@ -193,7 +200,6 @@ target_compile_definitions(${COMPONENT_LIB} PRIVATE
CONFIG_ECC CONFIG_ECC
CONFIG_IEEE80211W CONFIG_IEEE80211W
CONFIG_SHA256 CONFIG_SHA256
CONFIG_DPP
CONFIG_WNM CONFIG_WNM
) )
@@ -219,4 +225,7 @@ endif()
if(CONFIG_WPA_MBO_SUPPORT) if(CONFIG_WPA_MBO_SUPPORT)
target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_MBO) target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_MBO)
endif() endif()
if(CONFIG_WPA_DPP_SUPPORT)
target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_DPP)
endif()
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 3) set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 3)

View File

@@ -52,8 +52,8 @@ menu "Supplicant"
rigorously. Disabling this add the workaorunds with various APs. rigorously. Disabling this add the workaorunds with various APs.
Enabling this may cause inter operability issues with some APs. Enabling this may cause inter operability issues with some APs.
menuconfig WPA_11KV_SUPPORT config WPA_11KV_SUPPORT
bool "Enable 802.11k, 802.11v APIs handling in supplicant" bool "Enable 802.11k, 802.11v APIs handling"
default n default n
help help
Select this option to enable 802.11k 802.11v APIs(RRM and BTM support). Select this option to enable 802.11k 802.11v APIs(RRM and BTM support).
@@ -68,7 +68,7 @@ menu "Supplicant"
and on the radio environment. Current implementation adds beacon report, and on the radio environment. Current implementation adds beacon report,
link measurement, neighbor report. link measurement, neighbor report.
menuconfig WPA_SCAN_CACHE config WPA_SCAN_CACHE
bool "Keep scan results in cache" bool "Keep scan results in cache"
depends on WPA_11KV_SUPPORT depends on WPA_11KV_SUPPORT
default n default n
@@ -76,10 +76,19 @@ menu "Supplicant"
Keep scan results in cache, if not enabled, those Keep scan results in cache, if not enabled, those
will be flushed immediately. will be flushed immediately.
menuconfig WPA_MBO_SUPPORT config WPA_MBO_SUPPORT
bool "Enable MBO support in supplicant" bool "Enable MBO support"
depends on WPA_11KV_SUPPORT
default n default n
select WPA_11KV_SUPPORT
select WPA_SCAN_CACHE
help help
Select this option to enable WiFi Multiband operation certification support. Select this option to enable WiFi Multiband operation certification support.
config WPA_DPP_SUPPORT
bool "Enable DPP support"
default n
select WPA_MBEDTLS_CRYPTO
help
Select this option to enable WiFi Easy Connect Support.
endmenu endmenu

View File

@@ -1,16 +1,8 @@
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef ESP_DPP_H #ifndef ESP_DPP_H
#define ESP_DPP_H #define ESP_DPP_H

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -12,6 +12,7 @@
#include "esp_wifi.h" #include "esp_wifi.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#ifdef CONFIG_DPP
static void *s_dpp_task_hdl = NULL; static void *s_dpp_task_hdl = NULL;
static void *s_dpp_evt_queue = NULL; static void *s_dpp_evt_queue = NULL;
static void *s_dpp_api_lock = NULL; static void *s_dpp_api_lock = NULL;
@@ -674,3 +675,4 @@ void esp_supp_dpp_deinit(void)
dpp_global_deinit(s_dpp_ctx.dpp_global); dpp_global_deinit(s_dpp_ctx.dpp_global);
esp_dpp_post_evt(SIG_DPP_DEL_TASK, 0); esp_dpp_post_evt(SIG_DPP_DEL_TASK, 0);
} }
#endif

View File

@@ -0,0 +1 @@
CONFIG_WPA_DPP_SUPPORT=y