Skip to content

Build fail with TLS Server session ticket enable (IDFGH-9927) #11222

Closed
@ndedobbeleer

Description

@ndedobbeleer

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

5.0.1

Operating System used.

Windows

How did you build your project?

Eclipse IDE

If you are using Windows, please specify command line type.

None

What is the expected behavior?

When TLS server session is enable, the projetc should build.

What is the actual behavior?

The build process finish with 16 error

Steps to reproduce.

  1. Create project from template example using template "protocols/https_server/simple"
  2. Enable tls server session ticket in sdkconfig => CONFIG_ESP_TLS_SERVER_SESSION_TICKETS=y
  3. Check if mbedtls server SLL session ticket is enable => CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y (default : yes)
  4. Build the project
  5. Build fail

Build or installation Logs.

[10/309] ccache C:\Espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -IC:/Espressif/frameworks/esp-idf-v5.0.1/workspace/simple/build/config -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp-tls-crypto -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/private_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/newlib/platform_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/esp_additions/include/freertos -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/esp_additions/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include/soc -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include/soc/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/port/esp32s3/. -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/port/esp32s3/private_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/heap/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/log/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/esp32s3/. -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/platform_port/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/include/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_common/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/port/soc -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/port/include/private -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/xtensa/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include/apps -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include/apps/sntp -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/lwip/src/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/port/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/port/esp32/include/arch -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/port/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/mbedtls/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/mbedtls/library -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/esp_crt_bundle/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/http_parser -mlongcalls  -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.0.1/workspace/simple=. -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.0.1=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0.1\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/esp-tls/CMakeFiles/__idf_esp-tls.dir/esp_tls_error_capture.c.obj -MF esp-idf\esp-tls\CMakeFiles\__idf_esp-tls.dir\esp_tls_error_capture.c.obj.d -o esp-idf/esp-tls/CMakeFiles/__idf_esp-tls.dir/esp_tls_error_capture.c.obj -c C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp_tls_error_capture.c
FAILED: esp-idf/esp-tls/CMakeFiles/__idf_esp-tls.dir/esp_tls_error_capture.c.obj 
ccache C:\Espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -IC:/Espressif/frameworks/esp-idf-v5.0.1/workspace/simple/build/config -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp-tls-crypto -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/private_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/newlib/platform_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/esp_additions/include/freertos -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/freertos/esp_additions/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include/soc -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/include/soc/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/port/esp32s3/. -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_hw_support/port/esp32s3/private_include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/heap/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/log/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/esp32s3/. -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/soc/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/hal/platform_port/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/include/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_rom/esp32s3 -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_common/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/port/soc -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/esp_system/port/include/private -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/xtensa/esp32s3/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include/apps -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/include/apps/sntp -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/lwip/src/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/port/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/lwip/port/esp32/include/arch -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/port/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/mbedtls/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/mbedtls/library -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/mbedtls/esp_crt_bundle/include -IC:/Espressif/frameworks/esp-idf-v5.0.1/components/http_parser -mlongcalls  -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.0.1/workspace/simple=. -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.0.1=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0.1\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/esp-tls/CMakeFiles/__idf_esp-tls.dir/esp_tls_error_capture.c.obj -MF esp-idf\esp-tls\CMakeFiles\__idf_esp-tls.dir\esp_tls_error_capture.c.obj.d -o esp-idf/esp-tls/CMakeFiles/__idf_esp-tls.dir/esp_tls_error_capture.c.obj -c C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp_tls_error_capture.c
In file included from C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp_tls_error_capture.c:7:
C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp_tls.h:191:5: error: unknown type name 'mbedtls_entropy_context'
  191 |     mbedtls_entropy_context entropy;                                            /*!< mbedTLS entropy context structure */
      |     ^~~~~~~~~~~~~~~~~~~~~~~
C:/Espressif/frameworks/esp-idf-v5.0.1/components/esp-tls/esp_tls.h:193:5: error: unknown type name 'mbedtls_ctr_drbg_context'
  193 |     mbedtls_ctr_drbg_context ctr_drbg;                                          /*!< mbedTLS ctr drbg context structure.
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

More Information.

I can work around this problem with manually add this lines in sll_ticket.h :

#include "entropy.h"
#include "ctr_drbg.h"

But it's not a permanent solution. Maybe there is something else to do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions