diff --git a/include/image.h b/include/image.h index 889305cbef..54f2b58ac5 100644 --- a/include/image.h +++ b/include/image.h @@ -1072,18 +1072,18 @@ int calculate_hash(const void *data, int data_len, const char *algo, * At present we only support signing on the host, and verification on the * device */ -#if defined(CONFIG_FIT_SIGNATURE) -# ifdef USE_HOSTCC +#if defined(USE_HOSTCC) +# if defined(CONFIG_FIT_SIGNATURE) # define IMAGE_ENABLE_SIGN 1 # define IMAGE_ENABLE_VERIFY 1 -# include -#else +# include +# else # define IMAGE_ENABLE_SIGN 0 -# define IMAGE_ENABLE_VERIFY 1 +# define IMAGE_ENABLE_VERIFY 0 # endif #else # define IMAGE_ENABLE_SIGN 0 -# define IMAGE_ENABLE_VERIFY 0 +# define IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) #endif #ifdef USE_HOSTCC