public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER
@ 2021-08-26 21:55 Alexandru Gagniuc
  2021-09-30  1:41 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gagniuc @ 2021-08-26 21:55 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, Alexandru Gagniuc

We want the u-boot tools to be target agnostic, as explained in commit
cb9faa6f98ae (" tools: Use a single target-independent config to
enable OpenSSL")

Making mkimage features depend on CONFIG_FIT_CIPHER is contrary to
that goal. Thus, always enable cihper features in mkimage, and ignore
the value of CONFIG_FIT_CIPHER for host-only code.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
 include/image.h    | 5 -----
 tools/image-host.c | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/image.h b/include/image.h
index e20f0b69d5..381ee91eb5 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1432,14 +1432,9 @@ static inline int fit_image_check_target_arch(const void *fdt, int node)
  * device
  */
 #if defined(USE_HOSTCC)
-# if defined(CONFIG_FIT_CIPHER)
 #  define IMAGE_ENABLE_ENCRYPT	1
 #  define IMAGE_ENABLE_DECRYPT	1
 #  include <openssl/evp.h>
-# else
-#  define IMAGE_ENABLE_ENCRYPT	0
-#  define IMAGE_ENABLE_DECRYPT	0
-# endif
 #else
 # define IMAGE_ENABLE_ENCRYPT	0
 # define IMAGE_ENABLE_DECRYPT	CONFIG_IS_ENABLED(FIT_CIPHER)
diff --git a/tools/image-host.c b/tools/image-host.c
index d3a882ec29..82cb238f54 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -562,7 +562,7 @@ int fit_image_cipher_data(const char *keydir, void *keydest,
 		printf("Failure getting cipher node\n");
 		return -1;
 	}
-	if (!IMAGE_ENABLE_ENCRYPT || !keydir)
+	if (keydir)
 		return 0;
 	return fit_image_process_cipher(keydir, keydest, fit, image_name,
 		image_noffset, cipher_node_offset, data, size, cmdname);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER
  2021-08-26 21:55 [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER Alexandru Gagniuc
@ 2021-09-30  1:41 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2021-09-30  1:41 UTC (permalink / raw)
  To: Alexandru Gagniuc; +Cc: U-Boot Mailing List

On Thu, 26 Aug 2021 at 15:55, Alexandru Gagniuc <mr.nuke.me@gmail.com> wrote:
>
> We want the u-boot tools to be target agnostic, as explained in commit
> cb9faa6f98ae (" tools: Use a single target-independent config to
> enable OpenSSL")
>
> Making mkimage features depend on CONFIG_FIT_CIPHER is contrary to
> that goal. Thus, always enable cihper features in mkimage, and ignore
> the value of CONFIG_FIT_CIPHER for host-only code.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
>  include/image.h    | 5 -----
>  tools/image-host.c | 2 +-
>  2 files changed, 1 insertion(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

This is removed also by my recent part B series.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-30  1:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-26 21:55 [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER Alexandru Gagniuc
2021-09-30  1:41 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox