diff --git a/boot/bootutil/src/image_validate.c b/boot/bootutil/src/image_validate.c index 3f560f05d..9876b7767 100644 --- a/boot/bootutil/src/image_validate.c +++ b/boot/bootutil/src/image_validate.c @@ -358,10 +358,18 @@ bootutil_get_img_security_cnt(struct image_header *hdr, * TLV section. All other TLV entries must be in the protected section. */ static const uint16_t allowed_unprot_tlvs[] = { +#ifdef EXPECTED_KEY_TLV EXPECTED_KEY_TLV, +#endif /* EXPECTED_KEY_TLV */ +#ifdef EXPECTED_HASH_TLV EXPECTED_HASH_TLV, +#endif /* EXPECTED_HASH_TLV */ +#ifdef EXPECTED_SIG_TLV EXPECTED_SIG_TLV, +#endif /* EXPECTED_SIG_TLV */ +#ifdef EXPECTED_ENC_TLV EXPECTED_ENC_TLV, +#endif /* EXPECTED_ENC_TLV */ /* Mark end with ANY. */ IMAGE_TLV_ANY, };