Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Espressif Managed Component wolfSSH 1.4.18 post-release update #770

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gojimmypi
Copy link
Contributor

@gojimmypi gojimmypi commented Feb 5, 2025

This PR includes some post-release wolfSSH v1.18 updates for publishing to the Espressif Component Registry. The update is applied to the bbba8aef (v1.4.18 release). I'm also planning a v1.4.19 Managed Component Release in the near future.

Testing was performed using mywolfssl and mywolfssh, both using my gojimmypi namespace.

Core wolfSSH change

There's only one minor modification to the core wolfSSH library: test.h was edited to include an exclusion criteria during WOLFSSH_TEST_THREADING, specifically adding this !defined(SINGLE_THREADED):

#if !defined(WOLFSSH_OLD_THREADING) && !defined(WOLFSSH_OLDER_THREADING) && \
  !defined(SINGLE_THREADED)

Otherwise, this error is encountered at compile time:

FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj
/home/gojimmypi/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DIDF_VER=\"5.2.1.2407012\" -DLIBWOLFSSL_VERSION_GIT_HASH=\"db9d8bc24a5734a1c657f3349059f38a4c16c7eb\" -DLIBWOLFSSL_VERSION_GIT_HASH_DATE="\"'Wed Feb 5 11:47:05 2025 -0800'\"" -DLIBWOLFSSL_VERSION_GIT_SHORT_HASH=\"db9d8bc\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -DUNITY_INCLUDE_CONFIG_H -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/build/config -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/newlib/platform_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/esp_additions/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include/soc -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include/soc/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/port/esp32/. -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/port/esp32/private_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/heap/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/log/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/platform_port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/include/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_common/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/port/soc -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/port/include/private -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/deprecated_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include/apps -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include/apps/sntp -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/lwip/src/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/freertos/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include/arch -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include/sys -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/include -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl/wolfcrypt -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl/wolfcrypt/port/Espressif -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_event/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_netif/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_wifi/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_ringbuf/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/efuse/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/efuse/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_mm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/deprecated -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/analog_comparator/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/dac/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/gpio/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/gptimer/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/i2c/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/i2s/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/ledc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/mcpwm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/parlio/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/pcnt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/rmt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sdio_slave/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sdmmc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sigma_delta/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/spi/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/temperature_sensor/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/touch_sensor/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/twai/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/uart/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/usb_serial_jtag/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/touch_sensor/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_pm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/library -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/esp_crt_bundle/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/everest/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/p256-m -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_bootloader_format/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_app_format/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/bootloader_support/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/bootloader_support/bootloader_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_partition/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/app_update/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/spi_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/pthread/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_timer/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/app_trace/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/nvs_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_phy/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_phy/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/vfs/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/esp_supplicant/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_coex/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_wifi/wifi_apps/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/unity/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/unity/unity/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/cmock/CMock/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/console -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/http_parser -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp-tls -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp-tls/esp-tls-crypto -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/interface -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/deprecated/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_eth/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_gdbstub/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hid/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/tcp_transport/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_http_client/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_http_server/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_https_ota/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_psram/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_lcd/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_lcd/interface -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protobuf-c/protobuf-c -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/common -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/security -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/transports -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_local_ctrl/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/espcoredump/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/espcoredump/include/port/xtensa -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wear_levelling/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/sdmmc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/diskio -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/vfs -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/idf_test/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/idf_test/include/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/ieee802154/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/json/cJSON -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mqtt/esp-mqtt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/nvs_sec_provider/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/perfmon/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/spiffs/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wifi_provisioning/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/examples/common_components/protocol_examples_common/include -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh -mlongcalls -Wno-frame-address  -DWOLFSSL_USER_SETTINGS -DESP_ENABLE_WOLFSSH -DWOLFSSL_WOLFSSH -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX -DFOUND_PROTOCOL_EXAMPLES_DIR -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fstack-protector -fmacro-prefix-map=/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver=. -fmacro-prefix-map=/mnt/c/SysGCC/esp32/esp-idf/v5.2=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c /mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/main.c
In file included from /mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/main.c:38:
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h:954:32: error: unknown type name 'THREAD_CB'; did you mean 'THREAD_TYPE'?
  954 | static INLINE void ThreadStart(THREAD_CB fun, void* args, THREAD_TYPE* thread)
      |                                ^~~~~~~~~
      |                                THREAD_TYPE
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h: In function 'ThreadJoin':
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h:961:11: error: implicit declaration of function 'wolfSSL_JoinThread' [-Werror=implicit-function-declaration]
  961 |     (void)wolfSSL_JoinThread(thread);
      |           ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
[1041/1054] Building C object esp-idf/mywolfssh/CMakeFiles/__idf_mywolfssh.dir/src/io.c.obj
[1042/1054] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/echoserver.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/echoserver.c.obj
/home/gojimmypi/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DIDF_VER=\"5.2.1.2407012\" -DLIBWOLFSSL_VERSION_GIT_HASH=\"db9d8bc24a5734a1c657f3349059f38a4c16c7eb\" -DLIBWOLFSSL_VERSION_GIT_HASH_DATE="\"'Wed Feb 5 11:47:05 2025 -0800'\"" -DLIBWOLFSSL_VERSION_GIT_SHORT_HASH=\"db9d8bc\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -DUNITY_INCLUDE_CONFIG_H -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/build/config -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/newlib/platform_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/config/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/esp_additions/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include/soc -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/include/soc/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/port/esp32/. -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hw_support/port/esp32/private_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/heap/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/log/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/soc/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/platform_port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/hal/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/include/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_rom/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_common/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/port/soc -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_system/port/include/private -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/xtensa/deprecated_include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include/apps -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/include/apps/sntp -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/lwip/src/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/freertos/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include/arch -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/lwip/port/esp32xx/include/sys -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/include -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl/wolfcrypt -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/managed_components/gojimmypi__mywolfssl/wolfssl/wolfcrypt/port/Espressif -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/freertos/FreeRTOS-Kernel/include/freertos -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_event/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_netif/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_wifi/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_ringbuf/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/efuse/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/efuse/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_mm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/deprecated -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/analog_comparator/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/dac/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/gpio/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/gptimer/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/i2c/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/i2s/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/ledc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/mcpwm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/parlio/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/pcnt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/rmt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sdio_slave/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sdmmc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/sigma_delta/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/spi/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/temperature_sensor/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/touch_sensor/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/twai/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/uart/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/usb_serial_jtag/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/driver/touch_sensor/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_pm/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/library -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/esp_crt_bundle/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/everest/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/p256-m -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_bootloader_format/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_app_format/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/bootloader_support/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/bootloader_support/bootloader_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_partition/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/app_update/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/spi_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/pthread/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_timer/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/app_trace/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/nvs_flash/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_phy/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_phy/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/vfs/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/port/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wpa_supplicant/esp_supplicant/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_coex/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_wifi/wifi_apps/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/unity/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/unity/unity/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/cmock/CMock/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/console -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/http_parser -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp-tls -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp-tls/esp-tls-crypto -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/interface -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/esp32/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_adc/deprecated/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_eth/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_gdbstub/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_hid/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/tcp_transport/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_http_client/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_http_server/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_https_ota/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_psram/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_lcd/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_lcd/interface -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protobuf-c/protobuf-c -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/common -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/security -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/protocomm/include/transports -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/esp_local_ctrl/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/espcoredump/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/espcoredump/include/port/xtensa -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wear_levelling/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/sdmmc/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/diskio -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/src -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/fatfs/vfs -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/idf_test/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/idf_test/include/esp32 -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/ieee802154/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/json/cJSON -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/mqtt/esp-mqtt/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/nvs_sec_provider/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/perfmon/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/spiffs/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/components/wifi_provisioning/include -I/mnt/c/SysGCC/esp32/esp-idf/v5.2/examples/common_components/protocol_examples_common/include -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh -I/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh -mlongcalls -Wno-frame-address  -DWOLFSSL_USER_SETTINGS -DESP_ENABLE_WOLFSSH -DWOLFSSL_WOLFSSH -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX -DFOUND_PROTOCOL_EXAMPLES_DIR -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fstack-protector -fmacro-prefix-map=/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver=. -fmacro-prefix-map=/mnt/c/SysGCC/esp32/esp-idf/v5.2=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/echoserver.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/echoserver.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/echoserver.c.obj -c /mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/echoserver.c
In file included from /mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/main/echoserver.c:44:
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h:954:32: error: unknown type name 'THREAD_CB'; did you mean 'THREAD_TYPE'?
  954 | static INLINE void ThreadStart(THREAD_CB fun, void* args, THREAD_TYPE* thread)
      |                                ^~~~~~~~~
      |                                THREAD_TYPE
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h: In function 'ThreadJoin':
/mnt/c/workspace/wolfssl_scripts-gojimmypi/espressif/wolfssh-component-publish/examples/wolfssh_echoserver/components/mywolfssh/wolfssh/test.h:961:11: error: implicit declaration of function 'wolfSSL_JoinThread' [-Werror=implicit-function-declaration]
  961 |     (void)wolfSSL_JoinThread(thread);
      |           ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Espressif Examples Updated

Most of this PR is related to the Espressif examples:

  • Updated to reference recent version of required managed component wolfssl library, including user_settings.h and CMakeLists.txt from the reference template example.
  • Updated wolfssh CmakeLists.txt with various improvements, particularly related to more robust "find source code", better support of environment variables for WOLFSSH_ROOT_, and improved diagnostic messages.
  • The wolfssh_echoserver example now has improved settings for default SSID and password for WiFi setup.
  • Tidied up CMakeLists.txt files that were missing STATUS in message() statements, which previously would be STDERR messages.
  • Fixed ESP_ENABLE_WOLFSSH from CFLAGS and set related required settings in the respective user_settings.h.
  • Line ending, tabs, trailing spaces, spelling cleanup
  • Copyright year update
  • VisualGDB project file toolchain updated.
  • Added support for ESP8266 make/CMake, improved recent ESP-IDF versions. See also:

Testing

WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
cd $WRK_IDF_PATH
. ./export.sh

mkdir /mnt/c/testc
cd /mnt/c/testc

idf.py create-project-from-example "gojimmypi/mywolfssh=1.4.18-preview1n:wolfssh_template"
cd wolfssh_template
idf.py -b 115200 -p /dev/ttyS82 flash

cd ..

idf.py create-project-from-example "gojimmypi/mywolfssh=1.4.18-preview1n:wolfssh_echoserver"
cd wolfssh_echoserver
idf.py menuconfig
# set example SSID and PASSWORD
idf.py -b 115200 -p /dev/ttyS82 flash

Of particular interest during first build: the versions of components fetched. For example:

-- Building ESP-IDF components for target esp32
NOTICE: Manifest files have changed, solving dependencies.
......NOTICE: Updating lock file at /mnt/c/testc2/wolfssh_template/dependencies.lock
NOTICE: Processing 3 dependencies:
NOTICE: [1/3] gojimmypi/mywolfssh (1.4.18-preview1n)
NOTICE: [2/3] gojimmypi/mywolfssl (5.7.4-preview1i)
NOTICE: [3/3] idf (5.2.0)

Template Example Output

I (306) main_task: Started on CPU0
I (310) main_task: Calling app_main()
I (313) My Project: ------------ wolfSSL wolfSSH template Example ----------
I (321) My Project: --------------------------------------------------------
I (329) My Project: --------------------------------------------------------
I (337) My Project: ---------------------- BEGIN MAIN ----------------------
I (344) My Project: --------------------------------------------------------
I (352) My Project: --------------------------------------------------------
I (360) My Project: Hello wolfSSL!
I (364) My Project: DEBUG_WOLFSSH is not defined, so nothing will happen for the next statement
I (373) esp32_util: Extended Version and Platform Information.
I (380) esp32_util: Chip revision: v1.0
I (384) esp32_util: SSID and plain text WiFi password not displayed in startup logs.
I (393) esp32_util:   Define SHOW_SSID_AND_PASSWORD to enable display.
I (400) esp32_util: Using wolfSSL user_settings.h in //mnt//c//testc2//wolfssh_template//components//wolfssl/include/user_settings.h
I (412) esp32_util: LIBWOLFSSL_VERSION_STRING = 5.7.4
I (418) esp32_util: LIBWOLFSSL_VERSION_HEX = 5007004
I (424) esp32_util: Stack HWM: 9160
I (428) esp32_util:
I (431) esp32_util: Macro Name                 Defined   Not Defined
I (438) esp32_util: ------------------------- --------- -------------
I (445) esp32_util: NO_ESP32_CRYPT...........                 X
I (452) esp32_util: NO_ESPIDF_DEFAULT........                 X
I (458) esp32_util: HW_MATH_ENABLED..........     X
I (464) esp32_util: WOLFSSL_SHA224...........     X
I (469) esp32_util: WOLFSSL_SHA384...........     X
I (475) esp32_util: WOLFSSL_SHA512...........     X
I (480) esp32_util: WOLFSSL_SHA3.............                 X
I (487) esp32_util: HAVE_ED25519.............     X
I (493) esp32_util: HAVE_AES_ECB.............                 X
I (499) esp32_util: HAVE_AES_DIRECT..........                 X
I (506) esp32_util: USE_FAST_MATH............     X
I (511) esp32_util: WOLFSSL_SP_MATH_ALL......                 X
I (518) esp32_util: SP_MATH..................                 X
I (525) esp32_util: WOLFSSL_HW_METRICS.......     X
I (530) esp32_util: RSA_LOW_MEM..............     X
I (536) esp32_util: SMALL_SESSION_CACHE......                 X
I (542) esp32_util: WC_NO_HARDEN.............                 X
I (549) esp32_util: TFM_TIMING_RESISTANT.....     X
I (554) esp32_util: ECC_TIMING_RESISTANT.....     X
I (560) esp32_util: WC_NO_CACHE_RESISTANT....     X
I (566) esp32_util: WC_AES_BITSLICED.........                 X
I (572) esp32_util: WOLFSSL_AES_NO_UNROLL....                 X
I (579) esp32_util: TFM_TIMING_RESISTANT.....     X
I (584) esp32_util: ECC_TIMING_RESISTANT.....     X
I (590) esp32_util: WC_RSA_BLINDING..........     X
I (595) esp32_util: NO_WRITEV................     X
I (601) esp32_util: FREERTOS.................     X
I (606) esp32_util: NO_WOLFSSL_DIR...........     X
I (612) esp32_util: WOLFSSL_NO_CURRDIR.......     X
I (618) esp32_util: WOLFSSL_LWIP.............     X
I (623) esp32_util:
I (626) esp32_util: Compiler Optimization: Default
I (631) esp32_util:
I (634) esp32_util: CONFIG_IDF_TARGET = esp32
W (639) esp32_util: Watchdog active; missing WOLFSSL_ESP_NO_WATCHDOG definition.
I (647) esp32_util: CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: 240 MHz
I (654) esp32_util: Xthal_have_ccount: 1
I (659) esp32_util: CONFIG_MAIN_TASK_STACK_SIZE: 10500
I (664) esp32_util: CONFIG_ESP_MAIN_TASK_STACK_SIZE: 10500
I (671) esp32_util: CONFIG_TIMER_TASK_STACK_SIZE: 3584
I (676) esp32_util: CONFIG_TIMER_TASK_STACK_DEPTH: 2048
I (682) esp32_util: Stack HWM: 3ffb682f
I (687) esp32_util: CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: 240 MHz
I (693) esp32_util: Xthal_have_ccount: 1
I (698) esp32_util: ESP32_CRYPT is enabled for ESP32.
I (704) esp32_util: SINGLE_THREADED
I (708) esp32_util: Boot count: 1
I (712) My Project: Stack HWM: 8936
I (716) My Project: Stack used: 1564
I (720) My Project:
I (723) My Project: Found wolfSSL Version 5.7.4

I (728) My Project:
I (731) My Project: Found wolfSSH Version 1.4.18

I (737) My Project:

Done!

If running from idf.py monitor, press twice: Ctrl+]

WOLFSSL_COMPLETE

I (747) main_task: Returned from app_main()

SSH EchoServer Example Output

See the example README.md

Upon successful startup, look for the most recent lines Starting wolfSSH server_test:

I (20397) esp_netif_handlers: example_netif_sta ip: 192.168.1.73, mask: 255.255.                      255.0, gw: 192.168.1.1
I (20397) example_connect: Got IPv4 event: Interface "example_netif_sta" address                      : 192.168.1.73
I (20747) example_connect: Got IPv6 event: Interface "example_netif_sta" address
...
I (20774) My Project: Initial Stack Used (before wolfSSL Server): 2332 bytes
I (20781) My Project: Starting wolfSSH server_test...

Connect to the ESP32 IP address, port 22222, using the example shown IP address 192.168.1.73.

ssh -p 22222 [email protected]
# The default password for `jack` is `fetchapail`

When a successfully connection is established and authenticated with the sample login, typing characters in the ssh client should be echoed back from the ESP32 SSH server. There's no additional console output at the server.

When connecting via a program such as putty, an example dialog box like this is expected:

image

@gojimmypi
Copy link
Contributor Author

I'll probably be converting to draft while I investigate the test failures for my !defined(SINGLE_THREADED) change.

@gojimmypi gojimmypi self-assigned this Feb 5, 2025
@gojimmypi
Copy link
Contributor Author

It appears the root cause of the original THREAD_CB error is due to the ESP32 example echo server using older threading.

The !defined(SINGLE_THREADED) in test.h has been reverted in 67342af - however the errors persist.

I've added set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSH_OLD_THREADING") to fix the ESP32 echo server example via CMake:Lists.txt as the published wolfSSL Managed Components do not yet have the WOLFSSH_OLD_THREADING defined, nor a way to enable it with Kconfig via idf.py menuconfig.

Recall that Managed Component files cannot be changed without reverting to a non-managed component configuration.

This PR now only changes Espressif examples, along with the include.am update.

I am otherwise unable to reproduce the GitHub actions errors:

config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE="gmake" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details

I'm assuming the tests have been changed since the v1.4.18 that I am attempting.

@gojimmypi
Copy link
Contributor Author

gojimmypi commented Feb 6, 2025

As #771 is passing tests, it would seem the problem with this PR is not because it is based on an older commit of wolfSSH.

Could it be that the include.am file for the Espressif examples is really Ubuntu and Zepher failures? Seems unlikely.

  • edit: 771 was passing (the original commit was not based on the bbba8aef commit)... but is is in fact not passing when based on v1.4.18 after a rebase:
git rebase --onto bbba8aef 759bcbd3
git rebase --continue
git push --force

resulting in:

Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 20 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.26 KiB | 257.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/gojimmypi/wolfssh.git
 + eba368f6...79ffea58 pr-post-release-bbba8aef-espressif-readme -> pr-post-release-bbba8aef-espressif-readme (forced update)

ide/include.am Outdated
include ide/CSBENCH/include.am
include ide/MQX/include.am
incldue ide/Espressif/include.am
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what is breaking the builds, typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! thanks so much for that. fixed

@gojimmypi
Copy link
Contributor Author

Thanks @LinuxJedi for spotting the typo and @JacobBarthelmeh for confirming the remaining problem seems to be related to the base commit and (probably) not the contents of this PR.

Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Environment variable name or value is too long.

Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Unable to get pull request builder trigger!!
 '
Using context: Windows Build
Finished: FAILURE

I'm ready for code review for the original PR description (edited several times), in particular the test.h change.

This latest change on this branch has been published to gojimmypi/mywolfssh version 1.4.18-preview1r

Copy link
Member

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making the assumption that the ESP CMake stuff is correct, I have no idea :)

I've added some comments anyway, which may or may not help.


# The root of the project is two directories up from here. (we are typically in [project name]components/mywolfssh)
get_filename_component(PROJECT_ROOT "${THIS_DIR}" DIRECTORY) # Up one directory from here is "components"
get_filename_component(PROJECT_ROOT "${PROJECT_ROOT}" DIRECTORY) # up one more directory should be the root of our project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the above will likely break out-of-tree building. I'm assuming this doesn't matter for ESP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. This is very Espressif-specific.

The relative paths do not change.

A "component" in the local project directory MUST be in the components subdirectory, directly under the main project. In the case of wolfssl, in the components/wolfssl directory. There's no flexibility here.

image

The name of a managed component is slightly different: managed_components

image

See the IDF Component Manager docs.

endif()
message(STATUS "")

if ( "${${OUTPUT_FOUND_WOLFSSH_DIRECTORY}}" STREQUAL "" )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need quotes around the variable. You would normally do:

if ( OUTPUT_FOUND_WOLFSSH_DIRECTORY STREQUAL "" )

Also, I've never seen double ${ } around a variable before. Is this some kind of reference to a variable or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, very observant. This one is a bit tricky.

The OUTPUT_FOUND_WOLFSSH_DIRECTORY is an output parameter to a function called FIND_WOLFSSH_DIRECTORY

function(FIND_WOLFSSH_DIRECTORY OUTPUT_FOUND_WOLFSSH_DIRECTORY)

The parameter value is the name of the variable. See the call: FIND_WOLFSSH_DIRECTORY(WOLFSSH_ROOT)

In this case, OUTPUT_FOUND_WOLFSSH_DIRECTORY contains the variable name WOLFSSH_ROOT (not the actual path stored in WOLFSSH_ROOT

The reference to the variable WOLFSSH_ROOT contents will be updated inside the function. The double ${ } is needed for that.

#error "Problem with wolfSSL user_settings. " \
"Check components/wolfssl/include " \
"and confirm WOLFSSL_USER_SETTINGS is defined, " \
"typically in the component CMakeLists.txt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quote marks do not work how you would think they do here. Should be:

        #error Problem with wolfSSL user_settings.            \
               Check components/wolfssl/include               \
               and confirm WOLFSSL_USER_SETTINGS is defined,  \
               typically in the component CMakeLists.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc example with quotes. A best practice to use quotes, no?

https://gcc.gnu.org/onlinedocs/cpp/Diagnostics.html

It does work with or without quotes for Espressif, including the ESP8266 3.5 SDK

Do we have a standard? For example in tls13.

Copy link
Member

@LinuxJedi LinuxJedi Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works until you do multiline. Then it looks weird. I guess it doesn't really matter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an example:

void main(void)
{
        #error "Problem with wolfSSL user_settings. "           \
               "Check components/wolfssl/include "              \
               "and confirm WOLFSSL_USER_SETTINGS is defined, " \
               "typically in the component CMakeLists.txt"
}

When compiling:

$ gcc error.c     
error.c: In function ‘main’:
error.c:3:10: error: #error "Problem with wolfSSL user_settings. " "Check components/wolfssl/include " "and confirm WOLFSSL_USER_SETTINGS is defined, " "typically in the component CMakeLists.txt"
    3 |         #error "Problem with wolfSSL user_settings. "           \
      |          ^~~~~

/* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */
/* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */
#error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As my previous comment with the quote marks.

/* TODO determine low memory configuration for ECC. */
#else
/* when you want to use SHA512 */
#define WOLFSSL_SHA512
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something not for this pull request, but to think about later, #767 adds HMAC-SHA2-512, it can be disabled at compile time. We should probably make sure that happens automatically with the 8266.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, thanks for the heads up on that one. I've left myself a breadcrumb reminder.

/* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */
/* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */
#error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As my previous comments with the quote marks in #error directives for this and the one above it.

@gojimmypi gojimmypi requested a review from LinuxJedi February 7, 2025 21:29
@dgarske dgarske removed their assignment Feb 8, 2025
@dgarske dgarske removed their request for review February 8, 2025 00:02
@gojimmypi
Copy link
Contributor Author

Jenkins retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants