Skip to content

Commit 8441969

Browse files
dgarskedanielinux
authored andcommitted
Cleanup includes.
1 parent 8e6b0af commit 8441969

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

include/encrypt.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#ifdef WOLF_CRYPTO_CB
4242
#include <wolfssl/wolfcrypt/cryptocb.h>
4343
#endif
44+
#ifdef WOLFSSL_RENESAS_TSIP
45+
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
46+
#endif
4447

4548
#include <wolfssl/wolfcrypt/pwdbased.h>
4649

src/libwolfboot.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,12 @@ int RAMFUNCTION chacha_init(void)
15541554

15551555
Aes aes_dec, aes_enc;
15561556

1557+
#if defined(WOLFBOOT_RENESAS_TSIP)
1558+
/* Provides wrap_enc_key_t structure generated using
1559+
* Renesas Security Key Management Tool. See docs/Renesas.md */
1560+
#include "enckey_data.h"
1561+
#endif
1562+
15571563
/**
15581564
* @brief Initialize AES encryption.
15591565
*
@@ -1566,9 +1572,6 @@ Aes aes_dec, aes_enc;
15661572
int aes_init(void)
15671573
{
15681574
#if defined(WOLFBOOT_RENESAS_TSIP)
1569-
/* This structure is generated using Renesas Security Key Management Tool
1570-
* See docs/Renesas.md */
1571-
#include "enckey_data.h"
15721575
int ret;
15731576
int devId = RENESAS_DEVID + 1;
15741577
wrap_enc_key_t* enc_key =(wrap_enc_key_t*)RENESAS_TSIP_INSTALLEDENCKEY_ADDR;
@@ -1591,7 +1594,6 @@ int aes_init(void)
15911594
XMEMCPY(&aes_dec.ctx, &aes_enc.ctx, sizeof(aes_enc.ctx));
15921595

15931596
/* register AES crypto callback */
1594-
extern int wc_tsip_AesCipher(int devIdArg, struct wc_CryptoInfo* info, void* ctx);
15951597
wc_CryptoCb_RegisterDevice(devId, wc_tsip_AesCipher, NULL);
15961598

15971599
encrypt_initialized = 1;

0 commit comments

Comments
 (0)