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 fdbb3da1b4
commit b1f7ad6983
5 changed files with 41 additions and 40 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"
@@ -158,7 +157,14 @@ else()
set(roaming_src "") set(roaming_src "")
endif() endif()
idf_component_register(SRCS "${srcs}" "${tls_src}" "${roaming_src}" "${crypto_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}" "${tls_src}" "${roaming_src}" "${crypto_src}" "${dpp_src}"
INCLUDE_DIRS include port/include include/esp_supplicant INCLUDE_DIRS include port/include include/esp_supplicant
PRIV_INCLUDE_DIRS src src/utils PRIV_INCLUDE_DIRS src src/utils
PRIV_REQUIRES mbedtls esp_timer) PRIV_REQUIRES mbedtls esp_timer)
@@ -183,7 +189,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
) )
@@ -193,5 +198,7 @@ endif()
if(CONFIG_WPA_WPS_STRICT) if(CONFIG_WPA_WPS_STRICT)
target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_WPS_STRICT) target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_WPS_STRICT)
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

@@ -38,8 +38,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).
@@ -54,12 +54,19 @@ 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.
if WPA_11KV_SUPPORT config WPA_SCAN_CACHE
config WPA_SCAN_CACHE bool "Keep scan results in cache"
bool "Keep scan results in cache" depends on WPA_11KV_SUPPORT
default n default n
help help
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.
endif
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,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.
#include "esp_dpp_i.h" #include "esp_dpp_i.h"
#include "esp_dpp.h" #include "esp_dpp.h"
@@ -20,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;
@@ -676,3 +669,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