Commit c4a60a36 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

boot: bootutil: Add caps for encryption

Add a capability query for the two encryption options.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 3910ab1f
Loading
Loading
Loading
Loading
+2
Changes for boot/bootutil/include/bootutil/caps.h: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ uint32_t bootutil_get_caps(void);
#define BOOTUTIL_CAP_ECDSA_P256         (1<<2)
#define BOOTUTIL_CAP_SWAP_UPGRADE       (1<<3)
#define BOOTUTIL_CAP_OVERWRITE_UPGRADE  (1<<4)
#define BOOTUTIL_CAP_ENC_RSA            (1<<5)
#define BOOTUTIL_CAP_ENC_KW             (1<<6)

#ifdef __cplusplus
}
+6
Changes for boot/bootutil/src/caps.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -35,6 +35,12 @@ uint32_t bootutil_get_caps(void)
#else
        res |= BOOTUTIL_CAP_SWAP_UPGRADE;
#endif
#if defined(MCUBOOT_ENCRYPT_RSA)
	res |= BOOTUTIL_CAP_ENC_RSA;
#endif
#if defined(MCUBOOT_ENCRYPT_KW)
	res |= BOOTUTIL_CAP_ENC_KW;
#endif

        return res;
}