diff options
| author | Shiji Yang <yangshiji66@outlook.com> | 2025-06-20 00:38:17 +0800 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2025-06-22 10:16:39 -0600 |
| commit | 961e260cdcd01d68c8dae87eef67e116f1a67aed (patch) | |
| tree | ff2602c7aecbd82557516acb4167af48ae44590f /tools/image-host.c | |
| parent | 31e215fde81417299e45a6ae4a7ee880fac84c37 (diff) | |
lib: rsa: fix compilation error without openssl
The symbol TOOLS_IMAGE_PRE_LOAD doesn't depend on TOOLS_LIBCRYPTO.
If we choose to build tools without openssl, rsa_verify_openssl()
will attempt to call the unavailable openssl library functions.
Fixes: 942c8c8e6697 ("rsa: Add rsa_verify_openssl() to use openssl for host builds")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Diffstat (limited to 'tools/image-host.c')
| -rw-r--r-- | tools/image-host.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index a9b86902763..21dd7f2d922 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -19,7 +19,7 @@ #include <openssl/evp.h> #endif -#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) +#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) && CONFIG_IS_ENABLED(LIBCRYPTO) #include <openssl/rsa.h> #include <openssl/err.h> #endif @@ -1416,7 +1416,7 @@ int fit_check_sign(const void *fit, const void *key, } #endif -#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) +#if CONFIG_IS_ENABLED(IMAGE_PRE_LOAD) && CONFIG_IS_ENABLED(LIBCRYPTO) /** * rsa_verify_openssl() - Verify a signature against some data with openssl API * |
