@@ -161,12 +161,22 @@ extern "C" {
161161
162162#if defined(__WOLFBOOT ) || defined(UNIT_TEST_AUTH )
163163
164+ #include "wolfssl/wolfcrypt/settings.h"
165+ #include "wolfssl/wolfcrypt/visibility.h"
166+ #include "wolfssl/wolfcrypt/wc_port.h"
167+ #include "wolfssl/wolfcrypt/types.h"
168+
169+ #ifdef WOLFBOOT_RENESAS_TSIP
170+ /* Include these before any algorithm headers */
171+ #include "mcu/all/r_bsp_common.h"
172+ #include "r_bsp_config.h"
173+ #include "r_tsip_rx_if.h"
174+ #include "wolfssl/wolfcrypt/port/Renesas/renesas_tsip_types.h"
175+ #endif
176+
177+
164178/* Hashing configuration */
165179#if defined(WOLFBOOT_HASH_SHA256 )
166- #include "wolfssl/wolfcrypt/settings.h"
167- #include "wolfssl/wolfcrypt/visibility.h"
168- #include "wolfssl/wolfcrypt/wc_port.h"
169- #include "wolfssl/wolfcrypt/types.h"
170180 #include "wolfssl/wolfcrypt/sha256.h"
171181# ifndef WOLFBOOT_SHA_BLOCK_SIZE
172182# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -182,10 +192,6 @@ extern "C" {
182192 typedef wc_Sha256 wolfBoot_hash_t ;
183193# define HDR_HASH HDR_SHA256
184194#elif defined(WOLFBOOT_HASH_SHA384 )
185- #include "wolfssl/wolfcrypt/settings.h"
186- #include "wolfssl/wolfcrypt/visibility.h"
187- #include "wolfssl/wolfcrypt/wc_port.h"
188- #include "wolfssl/wolfcrypt/types.h"
189195 #include "wolfssl/wolfcrypt/sha512.h"
190196# ifndef WOLFBOOT_SHA_BLOCK_SIZE
191197# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -201,10 +207,6 @@ extern "C" {
201207 typedef wc_Sha384 wolfBoot_hash_t ;
202208# define HDR_HASH HDR_SHA384
203209#elif defined(WOLFBOOT_HASH_SHA3_384 )
204- #include "wolfssl/wolfcrypt/settings.h"
205- #include "wolfssl/wolfcrypt/visibility.h"
206- #include "wolfssl/wolfcrypt/wc_port.h"
207- #include "wolfssl/wolfcrypt/types.h"
208210 #include "wolfssl/wolfcrypt/sha3.h"
209211# ifndef WOLFBOOT_SHA_BLOCK_SIZE
210212# define WOLFBOOT_SHA_BLOCK_SIZE (256)
@@ -234,7 +236,8 @@ extern "C" {
234236
235237#endif
236238
237- #if defined(__WOLFBOOT ) || defined (__FLASH_OTP_PRIMER ) || defined (UNIT_TEST_AUTH ) || defined(WOLFBOOT_TPM )
239+ #if defined(__WOLFBOOT ) || defined (__FLASH_OTP_PRIMER ) || \
240+ defined (UNIT_TEST_AUTH ) || defined(WOLFBOOT_TPM )
238241
239242 /* Authentication configuration */
240243 #if defined(WOLFBOOT_NO_SIGN )
0 commit comments