Skip to content

Commit 60f158a

Browse files
rlubosNordicBuilder
authored andcommitted
net: Override some nRF Security defaults for networking
* Reduce MBEDTLS_SSL_OUT_CONTENT_LEN / MBEDTLS_SSL_IN_CONTENT_LEN in case NET_TEST symbol (enabled in most of the networking tests) is enabled. Otherwise, the default is 16k for both, which would require larger heap sizes (and thus noup patches) * PSA_WANT_GENERATE_RANDOM is required for DTLS cookie generation, the symbol is NCS-specific, therefore cannot be added to the configuration file w/o a noup patch. As DTLS won't work w/o this config enabled anyway, make sure it's always enabled with DTLS sockets. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
1 parent 6ec529b commit 60f158a

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

subsys/net/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ rsource "lib/Kconfig"
99
rsource "openthread/Kconfig"
1010
rsource "l2_wifi_if_conn/Kconfig"
1111
rsource "l2_dect/Kconfig"
12+
rsource "Kconfig.defconfig"
1213

1314
endmenu

subsys/net/Kconfig.defconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2026 Nordic Semiconductor
2+
#
3+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
#
5+
6+
# Default configurations for networking subsystem in NCS
7+
8+
if NETWORKING
9+
10+
config NET_SOCKETS_ENABLE_DTLS
11+
select PSA_WANT_GENERATE_RANDOM if NRF_SECURITY
12+
13+
endif # NETWORKING

subsys/nrf_security/Kconfig.tls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,15 @@ config MBEDTLS_SSL_OUT_CONTENT_LEN
305305
prompt "Max length for TLS outgoing fragments"
306306
range 0 16384
307307
default 900 if OPENTHREAD_NRF_SECURITY || OPENTHREAD_NRF_SECURITY_PSA
308+
default 2048 if NET_TEST
308309
default 16384
309310

310311
config MBEDTLS_SSL_IN_CONTENT_LEN
311312
prompt "Max length for TLS outgoing fragments"
312313
int
313314
range 0 16384
314315
default 900 if OPENTHREAD_NRF_SECURITY || OPENTHREAD_NRF_SECURITY_PSA
316+
default 2048 if NET_TEST
315317
default 16384
316318

317319

0 commit comments

Comments
 (0)