Skip to content

Commit b9fb4a6

Browse files
committed
bootutil: Add MCUBOOT_USE_TLV_ALLOW_LIST
The ALLOW_ROGUE_TLVS is used to turn off TLV filtering in code, basically to prevent processing TLVs that MCUboot is not compiled to serve anyway. The commit replaces identifier ALLOW_ROGUE_TLVS with MCUBOOT_USE_TLV_ALLOW_LIST and reverse the logic around it, as it now means opposite to the original. This gives the feature an identifier in style of the mcuboot_config.h defined identifiers. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 8667800 commit b9fb4a6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

boot/bootutil/src/image_validate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int bootutil_check_for_pure(const struct image_header *hdr,
155155
}
156156
#endif
157157

158-
#ifndef ALLOW_ROGUE_TLVS
158+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
159159
/*
160160
* The following list of TLVs are the only entries allowed in the unprotected
161161
* TLV section. All other TLV entries must be in the protected section.
@@ -293,7 +293,7 @@ bootutil_img_validate(struct boot_loader_state *state,
293293
break;
294294
}
295295

296-
#ifndef ALLOW_ROGUE_TLVS
296+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
297297
/*
298298
* Ensure that the non-protected TLV only has entries necessary to hold
299299
* the signature. We also allow encryption related keys to be in the
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Control over compilation of unprotected TLV allow list has been exposed
2+
using MCUBOOT_USE_TLV_ALLOW_LIST mcuboot configuration identifier.

0 commit comments

Comments
 (0)