Skip to content

Commit 98be383

Browse files
joerchanrlubos
authored andcommitted
net: tls_credentials: Add TLS credential backend for nrf_modem
Add TLS credential backend for nrf_modem so that TLS credentials will be sent to the nRF modem for persistent storage and to be used in TLS connections. Signed-off-by: Joakim Andersson <[email protected]>
1 parent 9559d72 commit 98be383

File tree

5 files changed

+423
-0
lines changed

5 files changed

+423
-0
lines changed

subsys/net/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ add_subdirectory_ifdef(CONFIG_FTP_CLIENT ftp_client)
3030
add_subdirectory_ifdef(CONFIG_COAP_UTILS coap_utils)
3131
add_subdirectory_ifdef(CONFIG_LWM2M_CLIENT_UTILS lwm2m_client_utils)
3232
add_subdirectory_ifdef(CONFIG_WIFI_CREDENTIALS wifi_credentials)
33+
add_subdirectory_ifdef(CONFIG_TLS_CREDENTIALS tls_credentials)
3334
add_subdirectory_ifdef(CONFIG_SOFTAP_WIFI_PROVISION softap_wifi_provision)
3435
add_subdirectory_ifdef(CONFIG_WIFI_MGMT_EXT wifi_mgmt_ext)
3536
add_subdirectory_ifdef(CONFIG_WIFI_READY_LIB wifi_ready)

subsys/net/lib/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ rsource "icalendar_parser/Kconfig"
4141
rsource "ftp_client/Kconfig"
4242
rsource "coap_utils/Kconfig"
4343
rsource "lwm2m_client_utils/Kconfig"
44+
rsource "tls_credentials/Kconfig"
4445
rsource "wifi_credentials/Kconfig"
4546
rsource "softap_wifi_provision/Kconfig"
4647
rsource "wifi_mgmt_ext/Kconfig"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
zephyr_library()
8+
9+
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/lib/tls_credentials)
10+
11+
zephyr_library_sources_ifdef(CONFIG_TLS_CREDENTIALS_BACKEND_NRF_MODEM
12+
tls_credentials_nrf_modem.c
13+
)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2025 Nordic Semiconductor
2+
#
3+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
#
5+
6+
if TLS_CREDENTIALS
7+
8+
config TLS_MAX_CREDENTIALS_NUMBER
9+
# Increase default maximum number of TLS credentials that can be registered.
10+
default 20 if TLS_CREDENTIALS_BACKEND_NRF_MODEM
11+
12+
choice TLS_CREDENTIALS_BACKEND
13+
depends on TLS_CREDENTIALS
14+
default TLS_CREDENTIALS_BACKEND_NRF_MODEM if NRF_MODEM_LIB
15+
help
16+
TLS credentials management backend implementation.
17+
18+
config TLS_CREDENTIALS_BACKEND_NRF_MODEM
19+
bool "Use modem credentials storage as backend"
20+
depends on MODEM_KEY_MGMT
21+
help
22+
TLS credentials management backend using the nrf modem key management API to store
23+
credentials and keep entries across system reboot.
24+
Entries are loaded from the modem at boot, and can then be used in socket connections.
25+
26+
endchoice
27+
28+
endif # TLS_CREDENTIALS

0 commit comments

Comments
 (0)