MBEDTLS configuration on NCS 2.6.4 for DTLS over Openthread

Hi there!

I'm in the process of updating our codebase from 2.4.0 to 2.6.4. We are using the nRF52840. My plan is to do this step-wise, following the migration guides for each major release. It seems that the mbedtls and crytpo configurations have changed between versions. I am using Zephyr's CoAP library over DTLS, with openthread as my net layer.

When building my application, I am getting many warnings where some mbedtls functions are not being included (and there are subsequent errors when linking):

I have traced this issue down to the config MBEDTLS_SSL_CLI_C not being selected. I took a look at the Kconfig entry, and it lists the following:



I can see that this symbol's value is 'n', due to MBEDTLS_SSL_TLS_C being 'n' selected. Let's take a look at its entry:

Now this one has all its dependencies fulfilled, but it also says 'WPA_SUPP_CRYPTO_PSA' is n-selecting this symbol with no effect. This seems like a red herring.

Looking into WPA_SUPP_CRYPTO_PSA, it seems like it is the only symbol that selects MBEDTLS_SSL_TLS_C. grepping for "select MBEDTLS_SSL_TLS_C" yields "nrf/modules/hostap/Kconfig" where WPA_SUPP_CRYPTO_PSA is defined.

I have tried looking into WPA_SUPP_CRYPTO_PSA but I am not using WiFi and I have not configured it in any way. I can also not figure out the dependency between these two symbols and why it is causing MBEDTLS_SSL_TLS_C to be n-selected. WPA_SUPP_CRYPTO_PSA  is not listed as a dependency for MBEDTLS_SSL_TLS_C.

I can't manually include CONFIG_MBEDTLS_SSL_TLS_C in my project config, as it " is not directly user-configurable (has no prompt)"

How can I get this variable, and subsequently MBEDTLS_SSL_CLI_C to be y-selected?

My old, 2.4.0 working configuration is as follows:

My current mbedtls configuration is as follows, based on the psa_tls example:

I have tried removing the MBEDTLS_SSL_TLS_C from MBEDTLS_SSL_CLI_C in the Kconfig, and y-selecting MBEDTLS_SSL_CLI_C manually just to see what would happen. I get the same warnings.

Any hints on how to properly navigate the nRF security/crypto configurations and enable SSL/DTLS for a project?

Thanks!

  • Hi, 

    I am working on your case and will update it when I collect enough information. 

    Regards,
    Amanda H. 

  • As a bit of an update, I have since updated over multiple steps to 2.7.0, and then 2.9.1. I have followed the migration guides to update the hardware board version to V2 and migrated to sysbuild.

    I am still having the same warnings and errors regarding mbedtls configuration for the Zephyr TLS libraries.

  • Also, I am able to recreate my problem with a built-in zephyr example (lwm2m_client) with the DTLS overlay and openthread enabled.

    I added the following configs to lwm2m_client/prj.conf:

    CONFIG_NET_L2_OPENTHREAD=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y

    and built the example with the following command:

    west build --pristine -b nrf52840dk/nrf52840 ../zephyr/samples/net/lwm2m_client/ -- -DEXTRA_CONF_FILE=overlay-dtls.conf

  • Hi Amanda,

    Have you had a chance to look into this problem? We are blocked on this.

  • Thanks for the reproduction details. 

    nealjack said:
    I am able to recreate my problem with a built-in zephyr example (lwm2m_client) with the DTLS overlay and openthread enabled.

    Are you using NCS v2.9.1?

    I have forwarded it to the team, and please give us more time to investigate the issue. 

1 2