Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrfcloud: use app jwt library #21142

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,11 @@ Libraries for networking
* :ref:`lib_nrf_cloud` library:

* Added the :kconfig:option:`CONFIG_NRF_CLOUD` Kconfig option to prevent unintended inclusion of nRF Cloud Kconfig variables in non-nRF Cloud projects.
* Updated to use the :ref:`lib_downloader` library for CoAP downloads.

* Updated:

* To use the :ref:`lib_downloader` library for CoAP downloads.
* To use the :ref:`lib_app_jwt` library to generate JWT tokens.

Libraries for NFC
-----------------
Expand Down
2 changes: 2 additions & 0 deletions lib/app_jwt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ zephyr_library()
zephyr_library_sources(
app_jwt.c
)

zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
5 changes: 4 additions & 1 deletion lib/app_jwt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

menuconfig APP_JWT
bool "Application JWT Library"
depends on SSF_CLIENT && SSF_PSA_CRYPTO_SERVICE_ENABLED && SSF_DEVICE_INFO_SERVICE_ENABLED
select BASE64
# Needed for time and date
select DATE_TIME
Expand All @@ -15,6 +14,10 @@ menuconfig APP_JWT
# Needed to print integer values in JSON
select CJSON_LIB
select CBPRINTF_FP_SUPPORT
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
select PSA_WANT_ALG_ECDSA
select PSA_WANT_ECC_SECP_R1_256
select PSA_WANT_ALG_SHA_256

if APP_JWT

Expand Down
9 changes: 1 addition & 8 deletions subsys/net/lib/nrf_cloud/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,7 @@ config NRF_CLOUD_JWT_SOURCE_CUSTOM
select EXPERIMENTAL
select TLS_CREDENTIALS
select BASE64
select TINYCRYPT
select TINYCRYPT_SHA256
select TINYCRYPT_ECC_DSA
select TINYCRYPT_CTR_PRNG
select TINYCRYPT_AES
select CJSON_LIB
depends on NEWLIB_LIBC_FLOAT_PRINTF || PICOLIBC_IO_FLOAT
depends on DATE_TIME
select APP_JWT
help
JWTs are created and signed by the nRF Cloud library, not the modem.
The signing key is obtained from the TLS credentials module.
Expand Down
Loading