Skip to content

Commit 5e77253

Browse files
committed
Addressed code review comments
1 parent 7a03b9f commit 5e77253

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

IDE/Renesas/e2studio/RA6M4/test/src/wolfssl_sce_unit_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ int sce_crypt_test()
808808
gCbInfo.wrapped_key_rsapri2048 =
809809
&g_wrapped_pair_2048key.priv_key;
810810
gCbInfo.wrapped_key_rsapub2048 =
811-
&g_wrapped_pair_2048key.pub_key;;
811+
&g_wrapped_pair_2048key.pub_key;
812812
}
813813

814814
/* Key generation for multi testing */

wolfcrypt/src/port/Renesas/renesas_fspsm_util.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int wc_fspsm_GenerateRandBlock(byte* output, word32 sz)
192192
{
193193
/* Generate PRNG based on NIST SP800-90A AES CTR-DRBG */
194194
int ret = 0;
195-
word32 fspbuf[RANDGEN_WORDS];
195+
uint32_t fspbuf[RANDGEN_WORDS];
196196

197197
while (sz > 0) {
198198
word32 len = sizeof(buffer);
@@ -201,8 +201,8 @@ int wc_fspsm_GenerateRandBlock(byte* output, word32 sz)
201201
len = sz;
202202
}
203203
/* return 4 words random number*/
204-
ret = R_RANDOM_GEN((uint32_t*)fspbuf);
205-
if(ret == FSP_SUCCESS) {
204+
ret = R_RANDOM_GEN(fspbuf);
205+
if (ret == FSP_SUCCESS) {
206206
XMEMCPY(output, &fspbuf, len);
207207
output += len;
208208
sz -= len;
@@ -404,7 +404,7 @@ int fspsm_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
404404

405405
/* sanity check */
406406
if (ssl == NULL || pubKeyDer == NULL || pubKeySz == NULL ||
407-
out == NULL || outlen == NULL || cbInfo == NULL||
407+
out == NULL || outlen == NULL || cbInfo == NULL ||
408408
cbInfo->internal == NULL)
409409
return WOLFSSL_FAILURE;
410410

@@ -1251,6 +1251,7 @@ int wc_fspsm_TlsCleanup(WOLFSSL* ssl)
12511251
/* zero clear */
12521252
ForceZero(tuc, sizeof(FSPSM_ST));
12531253
ssl->RenesasUserCtx = NULL;
1254+
12541255
return ret;
12551256
}
12561257
/* Set callback contexts needed for sce TLS api handling */

wolfssl/wolfcrypt/port/Renesas/renesas_fspsm_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-types.h>
2626
#include <wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-crypt.h>
2727

28-
/* flsgas related to TLS */
28+
/* Wrapped TLS FSP Key Set Flags */
2929
struct FSPSM_tls_flg_ST {
3030
uint8_t pk_key_set:1;
3131
uint8_t session_key_set:1;

0 commit comments

Comments
 (0)