From 03e598263e3878b6f5d58f5525577903edadc644 Mon Sep 17 00:00:00 2001 From: Paul-Erwan Rio Date: Thu, 21 Dec 2023 08:26:11 +0100 Subject: tools: fix build without LIBCRYPTO support Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") introduced a target-independent configuration to build crypto features in host tools. But since commit 2c21256b27d7 ("hash: Use Kconfig to enable hashing in host tools and SPL") the build without OpenSSL is broken, due to FIT signature/encryption features. Add missing conditional compilation tokens to fix this. Signed-off-by: Paul-Erwan Rio Tested-by: Alexander Dahl Cc: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- tools/image-host.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/image-host.c') diff --git a/tools/image-host.c b/tools/image-host.c index ca4950312f..90bc9f905f 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -14,8 +14,10 @@ #include #include +#if CONFIG_IS_ENABLED(FIT_SIGNATURE) #include #include +#endif /** * fit_set_hash_value - set hash value in requested has node @@ -1131,6 +1133,7 @@ static int fit_config_add_verification_data(const char *keydir, return 0; } +#if CONFIG_IS_ENABLED(FIT_SIGNATURE) /* * 0) open file (open) * 1) read certificate (PEM_read_X509) @@ -1239,6 +1242,7 @@ int fit_pre_load_data(const char *keydir, void *keydest, void *fit) out: return ret; } +#endif int fit_cipher_data(const char *keydir, void *keydest, void *fit, const char *comment, int require_keys, -- cgit v1.2.3