Skip to content

Commit

Permalink
Expected TLV usage put under conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-LeRoy committed Jan 15, 2025
1 parent 4dc6d60 commit b728c62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boot/bootutil/src/image_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit b728c62

Please sign in to comment.