diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index aa797884c..aeade5d0d 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -81,6 +81,7 @@ CONFIG_IDF_TARGET_ESP32C2 CONFIG_IDF_TARGET_ESP32C3 CONFIG_IDF_TARGET_ESP32C6 CONFIG_IDF_TARGET_ESP32H2 +CONFIG_IDF_TARGET_ESP32P4 CONFIG_IDF_TARGET_ESP32S2 CONFIG_IDF_TARGET_ESP32S3 CONFIG_IDF_TARGET_ESP8266 diff --git a/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt index ad97cb5a9..61110a150 100644 --- a/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt @@ -14,7 +14,6 @@ else() add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1) endif() - # The wolfSSL CMake file should be able to find the source code. # Otherwise, assign an environment variable or set it here: # @@ -129,7 +128,7 @@ endif() # an unintuitive error about Unknown CMake command "esptool_py_flash_project_args". if(0) - message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) @@ -140,7 +139,7 @@ if(0) else() message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}") endif() - message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h index 4644c6217..0259c536d 100644 --- a/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h @@ -110,18 +110,21 @@ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define TEST_ESPIDF_ALL_WOLFSSL - + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_server */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS /* wolfSSH Examples */ #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE) diff --git a/IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild b/IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild index ed9960248..06cc01df8 100644 --- a/IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild +++ b/IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild @@ -65,11 +65,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER - bool "SSH Echo Server" - help - See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER bool "SSH to UART Server for the ESP32" help @@ -95,12 +90,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfTPM on GitHub. - config WOLFSSL_APPLE_HOMEKIT - bool "Apple HomeKit for the ESP32" - help - See AchimPieters/esp32-homekit-demo on GitHub. - - config WOLFSSL_EXAMPLE_NAME_NONE bool "Other" help diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h index 4644c6217..779c96be8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/include/user_settings.h @@ -110,12 +110,13 @@ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define TEST_ESPIDF_ALL_WOLFSSL - + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */ #define USE_WOLFSSL_ESP_SDK_WIFI diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/Kconfig.projbuild b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/Kconfig.projbuild index 264c80883..83ff73ada 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/Kconfig.projbuild +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/Kconfig.projbuild @@ -1,5 +1,102 @@ +# Kconfig main +# +# Copyright (C) 2006-2025 wolfSSL Inc. +# +# This file is part of wolfSSL. +# +# wolfSSL is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# wolfSSL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA +# + +# Kconfig File Version 5.7.2.001 for wolfssl_template + menu "Example Configuration" +choice WOLFSSL_EXAMPLE_CHOOSE + prompt "Choose Example (See wolfssl/include/user_settings.h)" + default WOLFSSL_EXAMPLE_NAME_NONE + help + The user settings file can be adjusted to specific wolfSSL examples. + + config WOLFSSL_EXAMPLE_NAME_TEMPLATE + bool "wolfSSL Template" + help + The sample template app compiles in wolfSSL and prints the current wolfSSL Version. Nothing more. + + config WOLFSSL_EXAMPLE_NAME_TEST + bool "wolfSSL Test" + help + This app tests all cryptographic functions currently enabled. See also Benchmark performance app. + + config WOLFSSL_EXAMPLE_NAME_BENCHMARK + bool "wolfSSL Benchmark" + help + Benchmark performance app. See also cryptographic test. + + config WOLFSSL_EXAMPLE_NAME_TLS_CLIENT + bool "TLS Client" + help + TLS Client Example app. Needs WiFi and a listening server on port 11111. + + config WOLFSSL_EXAMPLE_NAME_TLS_SERVER + bool "TLS Server" + help + TLS Server Example app. Needs WiFi. More interesting with a TLS client using port 11111. + + config WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE + bool "SSH Template App" + help + Bare-bones Hello World app that only compiles in wolfSSL and wolfSSH. + See wolfSSL/wolfssh on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER + bool "SSH Echo Server" + help + See wolfSSL/wolfssh on GitHub. + + config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER + bool "SSH to UART Server for the ESP32" + help + See wolfSSL/wolfssh-examples on GitHub. + + config WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER + bool "SSH to UART Server for the ESP8266" + help + See wolfSSL/wolfssh-examples on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE + bool "MQTT Template" + help + See wolfSSL/wolfmqtt on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT + bool "MQTT AWS IoT" + help + See wolfSSL/wolfmqtt on GitHub. + + config WOLFTPM_EXAMPLE_NAME_ESPRESSIF + bool "TPM Test Example for the ESP32" + help + See wolfSSL/wolfTPM on GitHub. + + config WOLFSSL_EXAMPLE_NAME_NONE + bool "Other" + help + A specific example app is not defined. + +endchoice + config BENCH_ARGV string "Arguments for benchmark test" default "-lng 0" diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/sdkconfig.defaults b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/sdkconfig.defaults index 7fac4476f..bc63cebf8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/sdkconfig.defaults +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/sdkconfig.defaults @@ -1,5 +1,5 @@ # Set the known example app config to template example (see user_settings.h) -CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSL_BENCHMARK=y +CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK=y # CONFIG_EXAMPLE_WIFI_SSID="myssid" # CONFIG_EXAMPLE_WIFI_PASSWORD="mypassword" diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt index 868b15d85..f9b3bbfd0 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/CMakeLists.txt @@ -14,7 +14,6 @@ else() add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1) endif() - # The wolfSSL CMake file should be able to find the source code. # Otherwise, assign an environment variable or set it here: # @@ -129,7 +128,7 @@ endif() # an unintuitive error about Unknown CMake command "esptool_py_flash_project_args". if(0) - message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) @@ -140,7 +139,7 @@ if(0) else() message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}") endif() - message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h index 4644c6217..0259c536d 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h @@ -110,18 +110,21 @@ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define TEST_ESPIDF_ALL_WOLFSSL - + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_server */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS /* wolfSSH Examples */ #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/Kconfig.projbuild b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/Kconfig.projbuild index ed9960248..06cc01df8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/Kconfig.projbuild +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/Kconfig.projbuild @@ -65,11 +65,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER - bool "SSH Echo Server" - help - See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER bool "SSH to UART Server for the ESP32" help @@ -95,12 +90,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfTPM on GitHub. - config WOLFSSL_APPLE_HOMEKIT - bool "Apple HomeKit for the ESP32" - help - See AchimPieters/esp32-homekit-demo on GitHub. - - config WOLFSSL_EXAMPLE_NAME_NONE bool "Other" help diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt index 145129c46..a61aed3f0 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/CMakeLists.txt @@ -14,7 +14,6 @@ else() add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1) endif() - # The wolfSSL CMake file should be able to find the source code. # Otherwise, assign an environment variable or set it here: # @@ -129,7 +128,7 @@ endif() # an unintuitive error about Unknown CMake command "esptool_py_flash_project_args". if(0) - message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) @@ -140,7 +139,7 @@ if(0) else() message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}") endif() - message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h index 4644c6217..0259c536d 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/include/user_settings.h @@ -110,18 +110,21 @@ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define TEST_ESPIDF_ALL_WOLFSSL - + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_server */ #define USE_WOLFSSL_ESP_SDK_WIFI + #define WOLFSSL_VIS_FOR_TESTS /* wolfSSH Examples */ #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/Kconfig.projbuild b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/Kconfig.projbuild index ed9960248..06cc01df8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/Kconfig.projbuild +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/Kconfig.projbuild @@ -65,11 +65,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER - bool "SSH Echo Server" - help - See wolfSSL/wolfssh on GitHub. - config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER bool "SSH to UART Server for the ESP32" help @@ -95,12 +90,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE help See wolfSSL/wolfTPM on GitHub. - config WOLFSSL_APPLE_HOMEKIT - bool "Apple HomeKit for the ESP32" - help - See AchimPieters/esp32-homekit-demo on GitHub. - - config WOLFSSL_EXAMPLE_NAME_NONE bool "Other" help diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt index 05d74de93..2090c8ae8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/CMakeLists.txt @@ -14,7 +14,6 @@ else() add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1) endif() - # The wolfSSL CMake file should be able to find the source code. # Otherwise, assign an environment variable or set it here: # @@ -129,7 +128,7 @@ endif() # an unintuitive error about Unknown CMake command "esptool_py_flash_project_args". if(0) - message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include") # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) @@ -140,7 +139,7 @@ if(0) else() message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}") endif() - message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") + message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h index 4644c6217..0d81e732c 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/include/user_settings.h @@ -110,12 +110,13 @@ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define TEST_ESPIDF_ALL_WOLFSSL - + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */ /* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */ /* #define USE_WOLFSSL_ESP_SDK_WIFI */ #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB + #define WOLFSSL_VIS_FOR_TESTS #elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT) /* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */ #define USE_WOLFSSL_ESP_SDK_WIFI @@ -784,6 +785,15 @@ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI /***** END CONFIG_IDF_TARGET_ESP32H2 *****/ +#elif defined(CONFIG_IDF_TARGET_ESP32P4) + #define WOLFSSL_ESP32 + /* wolfSSL Hardware Acceleration not yet implemented */ + #define NO_ESP32_CRYPT + #define NO_WOLFSSL_ESP32_CRYPT_HASH + #define NO_WOLFSSL_ESP32_CRYPT_AES + #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI + /***** END CONFIG_IDF_TARGET_ESP32P4 *****/ + #elif defined(CONFIG_IDF_TARGET_ESP8266) #define WOLFSSL_ESP8266 diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/Kconfig.projbuild b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/Kconfig.projbuild index 264c80883..06cc01df8 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/Kconfig.projbuild +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/Kconfig.projbuild @@ -1,29 +1,112 @@ -menu "Example Configuration" +# Kconfig main +# +# Copyright (C) 2006-2025 wolfSSL Inc. +# +# This file is part of wolfSSL. +# +# wolfSSL is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# wolfSSL is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA +# -config BENCH_ARGV - string "Arguments for benchmark test" - default "-lng 0" +# Kconfig File Version 5.7.2.001 for wolfssl_template + +menu "Example wolfSSL Configuration" + +choice WOLFSSL_EXAMPLE_CHOOSE + prompt "Choose Example (See wolfssl/include/user_settings.h)" + default WOLFSSL_EXAMPLE_NAME_NONE help - -? Help, print this usage - 0: English, 1: Japanese - -csv Print terminal output in csv format - -base10 Display bytes as power of 10 (eg 1 kB = 1000 Bytes) - -no_aad No additional authentication data passed. - -dgst_full Full digest operation performed. - -rsa_sign Measure RSA sign/verify instead of encrypt/decrypt. - - Algorithm to benchmark. Available algorithms include: - cipher aes-cbc aes-gcm chacha20 chacha20-poly1305 - digest md5 poly1305 sha sha2 sha224 sha256 sha384 sha512 sha3 - sha3-224 sha3-256 sha3-384 sha3-512 - mac hmac hmac-md5 hmac-sha hmac-sha224 hmac-sha256 hmac-sha384 - hmac-sha512 - asym rsa rsa-sz dh ecc-kg ecc - other rng - -lng Display benchmark result by specified language. - 0: English, 1: Japanese - Size of block in bytes + The user settings file can be adjusted to specific wolfSSL examples. - e.g -lng 1 - e.g sha + config WOLFSSL_EXAMPLE_NAME_TEMPLATE + bool "wolfSSL Template" + help + The sample template app compiles in wolfSSL and prints the current wolfSSL Version. Nothing more. + + config WOLFSSL_EXAMPLE_NAME_TEST + bool "wolfSSL Test" + help + This app tests all cryptographic functions currently enabled. See also Benchmark performance app. + + config WOLFSSL_EXAMPLE_NAME_BENCHMARK + bool "wolfSSL Benchmark" + help + Benchmark performance app. See also cryptographic test. + + config WOLFSSL_EXAMPLE_NAME_TLS_CLIENT + bool "TLS Client" + help + TLS Client Example app. Needs WiFi and a listening server on port 11111. + + config WOLFSSL_EXAMPLE_NAME_TLS_SERVER + bool "TLS Server" + help + TLS Server Example app. Needs WiFi. More interesting with a TLS client using port 11111. + + config WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE + bool "SSH Template App" + help + Bare-bones Hello World app that only compiles in wolfSSL and wolfSSH. + See wolfSSL/wolfssh on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER + bool "SSH Echo Server" + help + See wolfSSL/wolfssh on GitHub. + + config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER + bool "SSH to UART Server for the ESP32" + help + See wolfSSL/wolfssh-examples on GitHub. + + config WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER + bool "SSH to UART Server for the ESP8266" + help + See wolfSSL/wolfssh-examples on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE + bool "MQTT Template" + help + See wolfSSL/wolfmqtt on GitHub. + + config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT + bool "MQTT AWS IoT" + help + See wolfSSL/wolfmqtt on GitHub. + + config WOLFTPM_EXAMPLE_NAME_ESPRESSIF + bool "TPM Test Example for the ESP32" + help + See wolfSSL/wolfTPM on GitHub. + + config WOLFSSL_EXAMPLE_NAME_NONE + bool "Other" + help + A specific example app is not defined. + +endchoice + +config WOLFSSL_TARGET_HOST + string "Target host" + default "127.0.0.1" + help + host address for the example to connect + +config WOLFSSL_TARGET_PORT + int "Target port" + default 11111 + help + host port for the example to connect endmenu diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/sdkconfig.defaults b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/sdkconfig.defaults index 6fd9876d0..50773fdc1 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_test/sdkconfig.defaults +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_test/sdkconfig.defaults @@ -1,5 +1,5 @@ # Set the known example app config to template example (see user_settings.h) -CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSL_TEST=y +CONFIG_WOLFSSL_EXAMPLE_NAME_TEST=y # CONFIG_EXAMPLE_WIFI_SSID="myssid" # CONFIG_EXAMPLE_WIFI_PASSWORD="mypassword" diff --git a/wolfcrypt/src/port/Espressif/esp32_util.c b/wolfcrypt/src/port/Espressif/esp32_util.c index 62f40a3d8..90b3cdcc8 100644 --- a/wolfcrypt/src/port/Espressif/esp32_util.c +++ b/wolfcrypt/src/port/Espressif/esp32_util.c @@ -741,7 +741,8 @@ esp_err_t esp_DisableWatchdog(void) #elif defined(CONFIG_IDF_TARGET_ESP32C2) || \ defined(CONFIG_IDF_TARGET_ESP32C3) || \ defined(CONFIG_IDF_TARGET_ESP32C6) || \ - defined(CONFIG_IDF_TARGET_ESP32H2) + defined(CONFIG_IDF_TARGET_ESP32H2) || \ + defined(CONFIG_IDF_TARGET_ESP32P4) #if ESP_IDF_VERSION_MINOR >= 3 #if CONFIG_ESP_TASK_WDT ret = esp_task_wdt_deinit(); @@ -791,7 +792,8 @@ esp_err_t esp_EnabledWatchdog(void) #elif defined(CONFIG_IDF_TARGET_ESP32C2) || \ defined(CONFIG_IDF_TARGET_ESP32C3) || \ defined(CONFIG_IDF_TARGET_ESP32C6) || \ - defined(CONFIG_IDF_TARGET_ESP32H2) + defined(CONFIG_IDF_TARGET_ESP32H2) || \ + defined(CONFIG_IDF_TARGET_ESP32P4) ESP_LOGW(TAG, "No known rtc_wdt_protect_off for this platform."); esp_task_wdt_config_t twdt_config = { .timeout_ms = 5000, /* Timeout in milliseconds */