[PATCH 18/22] image: Allow @ in node names when not using signatures

Simon Glass sjg at chromium.org
Tue Jul 6 00:32:56 CEST 2021


If signature verification is not in use we don't need to worry about
the risk of using @ in node names. Update fit_image_verify() to allow
it if the function is not enabled.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/image-fit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 0c5a05948d1..617375bfe1d 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1376,7 +1376,7 @@ int fit_image_verify(const void *fit, int image_noffset)
 	size_t		size;
 	char		*err_msg = "";
 
-	if (strchr(name, '@')) {
+	if (IS_ENABLED(CONFIG_FIT_SIGNATURE) && strchr(name, '@')) {
 		/*
 		 * We don't support this since libfdt considers names with the
 		 * name root but different @ suffix to be equal
-- 
2.32.0.93.g670b81a890-goog



More information about the U-Boot mailing list