From: Alexandru Gagniuc <mr.nuke.me@gmail.com>
To: u-boot@lists.denx.de
Cc: sjg@chromium.org, Alexandru Gagniuc <mr.nuke.me@gmail.com>
Subject: [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER
Date: Thu, 26 Aug 2021 16:55:33 -0500 [thread overview]
Message-ID: <20210826215533.256327-1-mr.nuke.me@gmail.com> (raw)
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
next reply other threads:[~2021-08-26 21:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 21:55 Alexandru Gagniuc [this message]
2021-09-30 1:41 ` [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210826215533.256327-1-mr.nuke.me@gmail.com \
--to=mr.nuke.me@gmail.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox