Addressed code review comments

This commit is contained in:
Hideki Miyazaki
2025-07-23 07:44:30 +09:00
parent 7a03b9fea6
commit 5e77253577
3 changed files with 7 additions and 6 deletions

View File

@@ -808,7 +808,7 @@ int sce_crypt_test()
gCbInfo.wrapped_key_rsapri2048 =
&g_wrapped_pair_2048key.priv_key;
gCbInfo.wrapped_key_rsapub2048 =
&g_wrapped_pair_2048key.pub_key;;
&g_wrapped_pair_2048key.pub_key;
}
/* Key generation for multi testing */

View File

@@ -192,7 +192,7 @@ int wc_fspsm_GenerateRandBlock(byte* output, word32 sz)
{
/* Generate PRNG based on NIST SP800-90A AES CTR-DRBG */
int ret = 0;
word32 fspbuf[RANDGEN_WORDS];
uint32_t fspbuf[RANDGEN_WORDS];
while (sz > 0) {
word32 len = sizeof(buffer);
@@ -201,8 +201,8 @@ int wc_fspsm_GenerateRandBlock(byte* output, word32 sz)
len = sz;
}
/* return 4 words random number*/
ret = R_RANDOM_GEN((uint32_t*)fspbuf);
if(ret == FSP_SUCCESS) {
ret = R_RANDOM_GEN(fspbuf);
if (ret == FSP_SUCCESS) {
XMEMCPY(output, &fspbuf, len);
output += len;
sz -= len;
@@ -404,7 +404,7 @@ int fspsm_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
/* sanity check */
if (ssl == NULL || pubKeyDer == NULL || pubKeySz == NULL ||
out == NULL || outlen == NULL || cbInfo == NULL||
out == NULL || outlen == NULL || cbInfo == NULL ||
cbInfo->internal == NULL)
return WOLFSSL_FAILURE;
@@ -1251,6 +1251,7 @@ int wc_fspsm_TlsCleanup(WOLFSSL* ssl)
/* zero clear */
ForceZero(tuc, sizeof(FSPSM_ST));
ssl->RenesasUserCtx = NULL;
return ret;
}
/* Set callback contexts needed for sce TLS api handling */

View File

@@ -25,7 +25,7 @@
#include <wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-types.h>
#include <wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-crypt.h>
/* flsgas related to TLS */
/* Wrapped TLS FSP Key Set Flags */
struct FSPSM_tls_flg_ST {
uint8_t pk_key_set:1;
uint8_t session_key_set:1;