Skip to content

Commit 22df2eb

Browse files
committed
[nrf fromtree] 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]> (cherry picked from commit a13624f)
1 parent 25f4981 commit 22df2eb

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
@@ -471,7 +471,7 @@ static int bootutil_check_for_pure(const struct image_header *hdr,
471471
}
472472
#endif
473473

474-
#ifndef ALLOW_ROGUE_TLVS
474+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
475475
/*
476476
* The following list of TLVs are the only entries allowed in the unprotected
477477
* TLV section. All other TLV entries must be in the protected section.
@@ -701,7 +701,7 @@ bootutil_img_validate(struct boot_loader_state *state,
701701
break;
702702
}
703703

704-
#ifndef ALLOW_ROGUE_TLVS
704+
#ifdef MCUBOOT_USE_TLV_ALLOW_LIST
705705
/*
706706
* Ensure that the non-protected TLV only has entries necessary to hold
707707
* 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)