mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER
PATCH 1/1 mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER
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.
--- include/image.h | 5 ----- tools/image-host.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
include/image.h +0 -5
@@ -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)
tools/image-host.c +1 -1
@@ -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);
Signature · 1 line
2.31.1
Quoted 9 lines · 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_CIPHERis contrary to that goal. Thus, always enable cihper features in mkimage, and ignore the value ofCONFIG_FIT_CIPHERfor host-only code.
Quoted 5 lines
Signed-off-by Alexandru Gagniuc <[email protected]>--- include/image.h | 5 ----- tools/image-host.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
This is removed also by my recent part B series.