Commit 82fb4124 authored by Tamas Ban's avatar Tamas Ban Committed by Andrzej Puzdrowski
Browse files

boot/bootutil: Clean-up fault injection hardening



Remove  unnecessary includes and create conditionally
the MCUBOOT_FIH_PROFILE_OFF define to avoid redefinition
warnings.

Change-Id: I6a34af2a5e45b81fdedd26bc1fa50ab0b9a05918
Signed-off-by: default avatarTamas Ban <tamas.ban@arm.com>
parent 4dc12f48
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@
#define FIH_ENABLE_GLOBAL_FAIL
#define FIH_ENABLE_CFI

#else
#elif !defined(MCUBOOT_FIH_PROFILE_OFF)
#define MCUBOOT_FIH_PROFILE_OFF
#endif /* MCUBOOT_FIH_PROFILE */

@@ -141,7 +141,6 @@ void fih_panic_loop(void);
 * to skip.
 */
#ifdef FIH_ENABLE_DELAY
#include "bootutil/bootutil_log.h"

/* Delaying logic, with randomness from a CSPRNG */
__attribute__((always_inline)) inline
+0 −2
Original line number Diff line number Diff line
@@ -13,8 +13,6 @@
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/entropy.h"

#include "bootutil/bootutil_log.h"

/* Mbedtls implementation of the delay RNG. Can be replaced by any other RNG
 * implementation that is backed by an entropy source by altering these
 * functions. This is not provided as a header API and a C file implementation