@@ -162,12 +162,22 @@ extern "C" {
162162
163163#if defined(__WOLFBOOT ) || defined(UNIT_TEST_AUTH )
164164
165+ #include "wolfssl/wolfcrypt/settings.h"
166+ #include "wolfssl/wolfcrypt/visibility.h"
167+ #include "wolfssl/wolfcrypt/wc_port.h"
168+ #include "wolfssl/wolfcrypt/types.h"
169+
170+ #ifdef WOLFBOOT_RENESAS_TSIP
171+ /* Include these before any algorithm headers */
172+ #include "mcu/all/r_bsp_common.h"
173+ #include "r_bsp_config.h"
174+ #include "r_tsip_rx_if.h"
175+ #include "wolfssl/wolfcrypt/port/Renesas/renesas_tsip_types.h"
176+ #endif
177+
178+
165179/* Hashing configuration */
166180#if defined(WOLFBOOT_HASH_SHA256 )
167- #include "wolfssl/wolfcrypt/settings.h"
168- #include "wolfssl/wolfcrypt/visibility.h"
169- #include "wolfssl/wolfcrypt/wc_port.h"
170- #include "wolfssl/wolfcrypt/types.h"
171181 #include "wolfssl/wolfcrypt/sha256.h"
172182# ifndef WOLFBOOT_SHA_BLOCK_SIZE
173183# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -183,10 +193,6 @@ extern "C" {
183193 typedef wc_Sha256 wolfBoot_hash_t ;
184194# define HDR_HASH HDR_SHA256
185195#elif defined(WOLFBOOT_HASH_SHA384 )
186- #include "wolfssl/wolfcrypt/settings.h"
187- #include "wolfssl/wolfcrypt/visibility.h"
188- #include "wolfssl/wolfcrypt/wc_port.h"
189- #include "wolfssl/wolfcrypt/types.h"
190196 #include "wolfssl/wolfcrypt/sha512.h"
191197# ifndef WOLFBOOT_SHA_BLOCK_SIZE
192198# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -202,10 +208,6 @@ extern "C" {
202208 typedef wc_Sha384 wolfBoot_hash_t ;
203209# define HDR_HASH HDR_SHA384
204210#elif defined(WOLFBOOT_HASH_SHA3_384 )
205- #include "wolfssl/wolfcrypt/settings.h"
206- #include "wolfssl/wolfcrypt/visibility.h"
207- #include "wolfssl/wolfcrypt/wc_port.h"
208- #include "wolfssl/wolfcrypt/types.h"
209211 #include "wolfssl/wolfcrypt/sha3.h"
210212# ifndef WOLFBOOT_SHA_BLOCK_SIZE
211213# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -235,7 +237,8 @@ extern "C" {
235237
236238#endif
237239
238- #if defined(__WOLFBOOT ) || defined (__FLASH_OTP_PRIMER ) || defined (UNIT_TEST_AUTH ) || defined(WOLFBOOT_TPM )
240+ #if defined(__WOLFBOOT ) || defined (__FLASH_OTP_PRIMER ) || \
241+ defined (UNIT_TEST_AUTH ) || defined(WOLFBOOT_TPM )
239242
240243 /* Authentication configuration */
241244 #if defined(WOLFBOOT_NO_SIGN )
0 commit comments