Skip to content
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
2 changes: 1 addition & 1 deletion lib/uuid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

zephyr_sources_ifdef(CONFIG_UUID uuid.c)

zephyr_library_link_libraries_ifdef(CONFIG_UUID_V5 mbedTLS)
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS_BUILTIN mbedTLS)
15 changes: 5 additions & 10 deletions lib/uuid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@
#
# SPDX-License-Identifier: Apache-2.0

menu "Universally Unique Identifier (UUID)"

config UUID
bool "UUID support"
menuconfig UUID
bool "Universally Unique Identifier (UUID) library"
help
Enable use of the UUID library.

if UUID

config UUID_V4
bool "UUID version 4 generation support"
depends on UUID
depends on ENTROPY_GENERATOR
help
Enable generation of UUID v4.

config UUID_V5
bool "UUID version 5 generation support"
depends on UUID
depends on MBEDTLS
depends on MBEDTLS_PSA_CRYPTO_C
depends on PSA_WANT_ALG_SHA_1
# When TF-M is enabled, Mbed TLS's MD module (which is used to generate
# v5 UUIDs) will dispacth hash operations to TF-M. Unfortunately TF-M
Expand All @@ -32,10 +28,9 @@ config UUID_V5

config UUID_BASE64
bool "UUID Base64 support"
depends on UUID
depends on BASE64
help
Enable conversion functions to write UUIDs in base 64
formats.

endmenu
endif
5 changes: 3 additions & 2 deletions modules/mbedtls/Kconfig.tf-psa-crypto
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ config MBEDTLS_PKCS5_C
choice MBEDTLS_PSA_CRYPTO_RNG_SOURCE
prompt "PSA crypto random source"
depends on MBEDTLS_PSA_CRYPTO_C
default MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG if CSPRNG_ENABLED
default MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG if CSPRNG_ENABLED \
|| !PSA_CRYPTO_PROVIDER_MBEDTLS
default MBEDTLS_PSA_CRYPTO_LEGACY_RNG

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
Expand Down Expand Up @@ -467,7 +468,7 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG
config MBEDTLS_PSA_CRYPTO_C
bool "Platform Security Architecture cryptography API"
depends on !BUILD_WITH_TFM
select CSPRNG_NEEDED
select CSPRNG_NEEDED if PSA_CRYPTO_PROVIDER_MBEDTLS

config MBEDTLS_USE_PSA_CRYPTO
bool "Use PSA APIs instead of legacy MbedTLS when possible"
Expand Down
3 changes: 1 addition & 2 deletions tests/lib/uuid/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ tests:
libraries.uuid.base:
extra_configs:
- CONFIG_UUID_V5=y
- CONFIG_MBEDTLS=y
- CONFIG_MBEDTLS_PSA_CRYPTO_C=y
- CONFIG_PSA_CRYPTO=y
- CONFIG_PSA_WANT_ALG_SHA_1=y
- CONFIG_UUID_BASE64=y
- CONFIG_BASE64=y
Expand Down
Loading