Skip to content
Permalink
Browse files

net: lwm2m: dont select MBEDTLS or set MBEDTLS options in subsys

If a sample wants to use the Zephyr implementation of mbedtls, it
enables CONFIG_MBEDTLS and sets any needed Zephyr-specific mbedtls
options.

Currently, the LwM2M subsystem selects MBEDTLS automatically when
LWM2M_DTLS_SUPPORT is enabled.  Let's remove this and let the
LwM2M client sample enable mbedtls and it's options.

This mimics the behavior of several other network-related samples
and removes conflicts when selecting alternate implementations of
MBEDTLS.

Fixes: #17399

Signed-off-by: Michael Scott <mike@foundries.io>
  • Loading branch information...
mike-scott authored and jukkar committed Jul 8, 2019
1 parent 82e889a commit 13086ccda85fad3719e8b709bb7909fc3626a0a1
Showing with 4 additions and 2 deletions.
  1. +4 −0 samples/net/lwm2m_client/overlay-dtls.conf
  2. +0 −2 subsys/net/lib/lwm2m/Kconfig
@@ -1,7 +1,11 @@
CONFIG_LWM2M_DTLS_SUPPORT=y
CONFIG_LWM2M_PEER_PORT=5684

# Select Zephyr mbedtls
CONFIG_MBEDTLS=y

# Special MbedTLS changes
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=1500
CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y
@@ -22,8 +22,6 @@ source "subsys/net/Kconfig.template.log_config.net"

config LWM2M_DTLS_SUPPORT
bool "Enable DTLS support in the LwM2M client"
select MBEDTLS
select MBEDTLS_ENABLE_HEAP
select TLS_CREDENTIALS
select NET_SOCKETS_SOCKOPT_TLS
select NET_SOCKETS_ENABLE_DTLS

0 comments on commit 13086cc

Please sign in to comment.
You can’t perform that action at this time.