Skip to content

Commit dc88f06

Browse files
authored
Merge pull request #151 from miyazakh/renesas_rh850_update
Fix CCRH compiler error
2 parents cff6c02 + ecc53aa commit dc88f06

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/wh_test_crypto.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -931,16 +931,16 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
931931
uint16_t keyId;
932932
/* Key for regular cache (≤ WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE) */
933933
const size_t smallKeySize = WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE / 2;
934-
uint8_t smallKey[smallKeySize];
934+
uint8_t smallKey[WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE/2];
935935
/* Key for big cache (> WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE) */
936936
const size_t bigKeySize = WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE + 100;
937-
uint8_t bigKey[bigKeySize];
937+
uint8_t bigKey[WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE+100];
938938

939939
uint8_t labelSmall[WH_NVM_LABEL_LEN] = "Small Key Label";
940940
uint8_t labelBig[WH_NVM_LABEL_LEN] = "Big Key Label";
941941

942942
/* Buffer for exported key and metadata */
943-
uint8_t exportedKey[bigKeySize];
943+
uint8_t exportedKey[WOLFHSM_CFG_SERVER_KEYCACHE_BUFSIZE+100];
944944
uint8_t exportedLabel[WH_NVM_LABEL_LEN];
945945
uint16_t exportedKeySize;
946946

@@ -1004,7 +1004,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
10041004
/* On error, try our best to clean up */
10051005
(void)wh_Client_KeyEvict(ctx, keyId);
10061006
}
1007-
1007+
10081008
if (ret == 0) {
10091009
ret = wh_Client_KeyEvict(ctx, keyId);
10101010
if (ret != 0) {
@@ -1078,7 +1078,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
10781078
/* On error, try our best to clean up */
10791079
(void)wh_Client_KeyEvict(ctx, keyId);
10801080
}
1081-
1081+
10821082
if (ret == 0) {
10831083
ret = wh_Client_KeyEvict(ctx, keyId);
10841084
if (ret != 0) {
@@ -1202,7 +1202,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
12021202
/* On error, try our best to clean up */
12031203
(void)wh_Client_KeyEvict(ctx, keyId);
12041204
}
1205-
1205+
12061206
if (ret == 0) {
12071207
ret = wh_Client_KeyEvict(ctx, keyId);
12081208
if (ret != 0) {
@@ -1278,7 +1278,7 @@ static int whTest_KeyCache(whClientContext* ctx, int devId, WC_RNG* rng)
12781278
/* On error, try our best to clean up */
12791279
(void)wh_Client_KeyEvict(ctx, keyId);
12801280
}
1281-
1281+
12821282
if (ret == 0) {
12831283
ret = wh_Client_KeyEvict(ctx, keyId);
12841284
if (ret != 0) {

test/wh_test_wolfcrypt_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#define BUFFER_SIZE 4096
7474
#define FLASH_RAM_SIZE (1024 * 1024) /* 1MB */
7575

76-
#ifdef WOLFHSM_CFG_ENABLE_CLIENT
76+
#if defined(WOLFHSM_CFG_ENABLE_CLIENT) && !defined(NO_CRYPT_TEST)
7777
int whTest_WolfCryptTestCfg(whClientConfig* config)
7878
{
7979
whClientContext client[1] = {0};

0 commit comments

Comments
 (0)