NX_SECURE_TLS_TLS_1_2_ENABLED and NX_SECURE_TLS_TLS_1_3_ENABLED should not be available as check boxes in STM32CubeMX
STM32CubeMX 6.18.0
MCU: STM32H563RIT6
To my understanding, this uses STM32CubeH5 1.7.0
Start a new project and enable ThreadX and NetX Duo.
In “NETXDUO Mode and Configuration”, enable “NX Core”, “Crypto” and “TLS”
In configuration, parameter column “NetXDuo” there are check-boxes for:
TLS CORE
NX_SECURE_TLS_ENABLE_TLS_1_1
NX_SECURE_TLS_ENABLE_TLS_1_3
NX_SECURE_TLS_TLS_1_2_ENABLED
NX_SECURE_TLS_TLS_1_3_ENABLED
This is a bug.
According to https://github.com/eclipse-threadx/rtos-docs/blob/1e36a62618de3771c973196e7648cba50d19cf1f/rtos-docs/netx-duo/netx-duo-secure-tls/chapter2.md#configuration-options the proper configuration options are
NX_SECURE_TLS_ENABLE_TLS_1_3 Defined, this option enables TLSv1.3 mode. TLS 1.3 is the newest version of TLS and is disabled by default. NX_SECURE_TLS_ENABLE_TLS_1_0 Defined, this option enables the legacy TLSv1.0 mode. TLSv1.0 is considered obsolete so it should only be enabled for backward-compatibility with older applications. NX_SECURE_TLS_ENABLE_TLS_1_1 Defined, this option enables the legacy TLSv1.1 mode. TLSv1.1 is considered obsolete so it should only be enabled for backward-compatibility with older applications.
NX_SECURE_TLS_TLS_1_2_ENABLED and NX_SECURE_TLS_TLS_1_3_ENABLED (and other preprocessor identifiers named *_TLS_TLS_*) are internal to NetXDuo and should not be touched from outside or provided as compiler arguments. They are set in Middlewares/ST/netxduo/nx_secure/inc/nx_secure_tls.h from the NX_SECURE_TLS_ENABLE_TLS_1_1 and NX_SECURE_TLS_ENABLE_TLS_1_3.
Note that checking NX_SECURE_TLS_TLS_1_2_ENABLED and NX_SECURE_TLS_TLS_1_3_ENABLED doesn’t actually affect the generated code (at least for STM32CubeIDE). Only .mxproject and the .ioc-file are changed.
But it is confusing for the developers. Especially since the latter options do not actually do anything. So they should be removed from the UI.
Best regards, Jesper
