Skip to content

Commit a13624f

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 <dominik.ermel@nordicsemi.no>
1 parent e375252 commit a13624f

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
@@ -161,7 +161,7 @@ static int bootutil_check_for_pure(const struct image_header *hdr, const struct
161161
}
162162
#endif
163163

164-
#ifndef ALLOW_ROGUE_TLVS
164+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
165165
/*
166166
* The following list of TLVs are the only entries allowed in the unprotected
167167
* TLV section. All other TLV entries must be in the protected section.
@@ -312,7 +312,7 @@ bootutil_img_validate(struct boot_loader_state *state,
312312
break;
313313
}
314314

315-
#ifndef ALLOW_ROGUE_TLVS
315+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
316316
/*
317317
* Ensure that the non-protected TLV only has entries necessary to hold
318318
* 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)