Hello,
I am building an example app that uses MbedTLS and non-offloaded sockets, because offloaded ones do not fit my needs - updating security credentials needs disabling the modem, while I perform a Bootstrap operation being connected to one server and obtain credentials for a Management server connection that need to be applied before Bootstrap connection. Also I intend to do runtime certificate provisioning that could not be achieved with offloaded sockets.
I use nRF9160DK. I had a working application on nCS 2.5 and I am trying to switch to nCS 3.1 but I can't figure out the MbedTLS configuration that will compile, because every time I get these errors:
/home/tomasz/zephyrproject/modules/crypto/mbedtls/include/mbedtls/check_config.h:637:2: error: #error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites" 637 | #error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites" | ^~~~~ /home/tomasz/zephyrproject/modules/crypto/mbedtls/include/mbedtls/check_config.h:643:2: error: #error "MBEDTLS_PLATFORM_STD_TIME defined, but not all prerequisites" 643 | #error "MBEDTLS_PLATFORM_STD_TIME defined, but not all prerequisites" | ^~~~~ /home/tomasz/zephyrproject/modules/crypto/mbedtls/include/mbedtls/check_config.h:648:2: error: #error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites" 648 | #error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites" | ^~~~~ /home/tomasz/zephyrproject/modules/crypto/mbedtls/include/mbedtls/check_config.h:653:2: error: #error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites" 653 | #error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites" | ^~~~~ /home/tomasz/zephyrproject/modules/crypto/mbedtls/include/mbedtls/check_config.h:658:2: error: #error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites" 658 | #error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites" | ^~~~~
I have experimented with changes in these switches
but I always get these errors. I can't manually define CONFIG_MBEDTLS_PLATFORM_C, I can't manually set anything like
CONFIG_MBEDTLS_PLATFORM_EXIT_ALT=y
CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT=y
CONFIG_MBEDTLS_PLATFORM_FPRINTF_ALT=y
CONFIG_MBEDTLS_PLATFORM_SNPRINTF_ALT=y
CONFIG_MBEDTLS_PLATFORM_TIME_ALT=y
CONFIG_MBEDTLS_PLATFORM_PRINTF=y
CONFIG_MBEDTLS_PLATFORM_FPRINTF=y
CONFIG_MBEDTLS_PLATFORM_SNPRINTF=y
CONFIG_MBEDTLS_PLATFORM_TIME=y
I can't find any example of that in nCS repo. I found a pretty similar issue here Can't build Google IOT MQTT Sample for nRF9160 with nRF Connect SDK 2.3.0
but I found the related file https://github.com/nrfconnect/sdk-nrf/blob/v2.3.0/samples/net/mqtt/overlay-tls-native_posix.conf