Skip to content

Commit 3a0951f

Browse files
tejlmandgalak
authored andcommitted
openthread: kconfig: rework OpenThread security configurations
With the updates to mbedTLS Kconfig it is now possible to update the OpenThread security configurations by disabling the mbedTLS prompt and avoid stuck symbol selection. As part of this, the OpenThread security selection has been reworked into a choice which ensures only a single security selection can be chosen. And the OPENTHREAD_MBEDTLS itself has been made promptless to ensure other parts of the build system can select a specific OpenThread security implementation and disable user selection, if the module or sample require such behavior. Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent 4164b17 commit 3a0951f

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

subsys/net/l2/openthread/Kconfig

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Copyright (c) 2018 Nordic Semiconductor ASA
44
# SPDX-License-Identifier: Apache-2.0
5+
config OPENTHREAD_SECURITY_INTERNAL
6+
bool
7+
help
8+
OpenThread setting to signal that OpenThread security settings, such
9+
as the OPENTHREAD_MBEDTLS setting will be controlled through other
10+
Kconfig dependencies and should not be user configurable.
511

612
menuconfig NET_L2_OPENTHREAD
713
bool "OpenThread L2"
@@ -153,9 +159,32 @@ config OPENTHREAD_SHELL
153159
depends on SHELL
154160
default y
155161

162+
config MBEDTLS_PROMPTLESS
163+
bool
164+
default y if !CUSTOM_OPENTHREAD_SECURITY
165+
166+
choice OPENTHREAD_SECURITY
167+
prompt "OpenThread security"
168+
default OPENTHREAD_MBEDTLS_CHOICE
169+
depends on !OPENTHREAD_SECURITY_INTERNAL
170+
171+
config CUSTOM_OPENTHREAD_SECURITY
172+
bool "Custom"
173+
help
174+
Security settings will be controlled directly by the user.
175+
Enabling this setting will give access to full control of mbed TLS
176+
configuration.
177+
178+
config OPENTHREAD_MBEDTLS_CHOICE
179+
bool "mbed TLS built-in"
180+
select OPENTHREAD_MBEDTLS
181+
help
182+
Use the OpenThread mbed TLS configuration pre-defined security scheme.
183+
184+
endchoice
185+
156186
config OPENTHREAD_MBEDTLS
157-
bool "Enable built-in mbedtls for use with OpenThread"
158-
default y
187+
bool
159188
select MBEDTLS
160189
select MBEDTLS_ENABLE_HEAP
161190
select MBEDTLS_CIPHER_AES_ENABLED

0 commit comments

Comments
 (0)