Skip to content

Commit 07e1381

Browse files
committed
Add a capability for querying downgrade prevention
Signed-off-by: Håkon Øye Amundsen <[email protected]> Signed-off-by: David Brown <[email protected]>
1 parent 2d1bac1 commit 07e1381

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

boot/bootutil/include/bootutil/caps.h

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ uint32_t bootutil_get_caps(void);
4444
#define BOOTUTIL_CAP_ED25519 (1<<9)
4545
#define BOOTUTIL_CAP_ENC_EC256 (1<<10)
4646
#define BOOTUTIL_CAP_SWAP_USING_MOVE (1<<11)
47+
#define BOOTUTIL_CAP_DOWNGRADE_PREVENTION (1<<12)
4748

4849
/*
4950
* Query the number of images this bootloader is configured for. This

boot/bootutil/src/caps.c

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ uint32_t bootutil_get_caps(void)
5757
#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
5858
res |= BOOTUTIL_CAP_VALIDATE_PRIMARY_SLOT;
5959
#endif
60+
#if defined(MCUBOOT_DOWNGRADE_PREVENTION)
61+
res |= BOOTUTIL_CAP_DOWNGRADE_PREVENTION;
62+
#endif
6063

6164
return res;
6265
}

0 commit comments

Comments
 (0)