From 31e38c83b38e5b12e8b8237966d29b1192edcb18 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Fri, 23 May 2025 09:43:37 +0200 Subject: [PATCH] lib: uuid: do not support UUID_v5 on TF-M platforms 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 does not support SHA-1 (because it's a weak algorithm) so the computation will fail. Signed-off-by: Valerio Setti --- lib/uuid/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/uuid/Kconfig b/lib/uuid/Kconfig index 8ee2a9a9cc3..927d8af2ddb 100644 --- a/lib/uuid/Kconfig +++ b/lib/uuid/Kconfig @@ -25,6 +25,11 @@ config UUID_V5 depends on MBEDTLS depends on MBEDTLS_MD depends on MBEDTLS_SHA1 + # 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 + # does not support SHA-1 (because it's a weak algorithm) so the + # computation will fail. + depends on !BUILD_WITH_TFM help Enable generation of UUID v5.