Skip to content

Commit

Permalink
Fix RA6M jankins failure
Browse files Browse the repository at this point in the history
  • Loading branch information
miyazakh committed Dec 17, 2024
1 parent fcbea85 commit 39c11c2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions IDE/Renesas/e2studio/RA6M4/test/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/FreeRTOS/FreeRTOS/Source/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_6/CMSIS/Core/Include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/source/include}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1484044149" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/src/port/Renesas/renesas_fspsm_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ WOLFSSL_LOCAL int wc_fspsm_AesGcmEncrypt(struct Aes* aes, byte* out,
* Aes.ctx.tsip_keyIdx is not used here.
*/
key_client_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
aes->heap, DYNAMIC_TYPE_AES);
key_server_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
aes->heap, DYNAMIC_TYPE_AES);
if (key_client_aes == NULL || key_server_aes == NULL) {
XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
Expand Down Expand Up @@ -505,9 +505,9 @@ WOLFSSL_LOCAL int wc_fspsm_AesGcmDecrypt(struct Aes* aes, byte* out,
* Aes.ctx.tsip_keyIdx is not used here.
*/
key_client_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
aes->heap, DYNAMIC_TYPE_AES);
key_server_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
aes->heap, DYNAMIC_TYPE_AES);
if (key_client_aes == NULL || key_server_aes == NULL) {
XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
Expand Down
20 changes: 10 additions & 10 deletions wolfcrypt/src/port/Renesas/renesas_fspsm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ WOLFSSL_LOCAL int wc_fspsm_EccVerifyTLS(WOLFSSL* ssl, const uint8_t* sig,
}

if ((sigforSCE = (uint8_t*)XMALLOC(HW_SCE_ECDSA_DATA_BYTE_SIZE, NULL,
DYNAMIC_TYPE_TEMP)) == NULL) {
DYNAMIC_TYPE_TMP_BUFFER)) == NULL) {
WOLFSSL_MSG("failed to malloc memory");
return MEMORY_E;
}
Expand Down Expand Up @@ -371,7 +371,7 @@ WOLFSSL_LOCAL int wc_fspsm_EccVerifyTLS(WOLFSSL* ssl, const uint8_t* sig,

ret = fspsm_ServerKeyExVerify(2, ssl, sigforSCE, 64, ctx);

XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TEMP);
XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TMP_BUFFER);

if (ret == WOLFSSL_SUCCESS) {
*result = 1;
Expand Down Expand Up @@ -749,9 +749,9 @@ WOLFSSL_LOCAL int wc_fspsm_generateSessionKey(WOLFSSL *ssl,
}
else {
key_client_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
ssl->heap, DYNAMIC_TYPE_AES);
key_server_aes = (FSPSM_AES_PWKEY)XMALLOC(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
ssl->heap, DYNAMIC_TYPE_AES);
if (key_client_aes == NULL || key_server_aes == NULL) {
return MEMORY_E;
}
Expand Down Expand Up @@ -790,7 +790,7 @@ WOLFSSL_LOCAL int wc_fspsm_generateSessionKey(WOLFSSL *ssl,
XMEMSET(enc->aes, 0, sizeof(Aes));
enc->aes->ctx.wrapped_key = (FSPSM_AES_PWKEY)XMALLOC
(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
ssl->heap, DYNAMIC_TYPE_AES);
if (enc->aes->ctx.wrapped_key == NULL)
return MEMORY_E;
}
Expand All @@ -808,7 +808,7 @@ WOLFSSL_LOCAL int wc_fspsm_generateSessionKey(WOLFSSL *ssl,

dec->aes->ctx.wrapped_key = (FSPSM_AES_PWKEY)XMALLOC
(sizeof(FSPSM_AES_WKEY),
aes->heap, DYNAMIC_TYPE_AE);
ssl->heap, DYNAMIC_TYPE_AES);
if (dec->aes->ctx.wrapped_key == NULL)
return MEMORY_E;
}
Expand Down Expand Up @@ -857,8 +857,8 @@ WOLFSSL_LOCAL int wc_fspsm_generateSessionKey(WOLFSSL *ssl,
cbInfo->keyflgs_tls.bits.session_key_set = 1;
}

XFREE(key_client_aes, aes->heap, DYNAMIC_TYPE_AES);
XFREE(key_server_aes, aes->heap, DYNAMIC_TYPE_AES);
XFREE(key_client_aes, ssl->heap, DYNAMIC_TYPE_AES);
XFREE(key_server_aes, ssl->heap, DYNAMIC_TYPE_AES);

/* unlock hw */
wc_fspsm_hw_unlock();
Expand Down Expand Up @@ -1019,7 +1019,7 @@ WOLFSSL_LOCAL int wc_fspsm_tls_CertVerify(
SCE_TLS_PUBLIC_KEY_TYPE_ECDSA_P256/*ECDSA*/) {

if ((sigforSCE = (uint8_t*)XMALLOC(HW_SCE_ECDSA_DATA_BYTE_SIZE, NULL,
DYNAMIC_TYPE_TEMP)) == NULL) {
DYNAMIC_TYPE_TMP_BUFFER)) == NULL) {
WOLFSSL_MSG("failed to malloc memory");
return MEMORY_E;
}
Expand Down Expand Up @@ -1071,7 +1071,7 @@ WOLFSSL_LOCAL int wc_fspsm_tls_CertVerify(
if (ret != FSP_SUCCESS) {
WOLFSSL_MSG(" R_XXX_TlsCertificateVerification() failed");
}
XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TEMP);
XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
wc_fspsm_hw_unlock();
}
else {
Expand Down

0 comments on commit 39c11c2

Please sign in to comment.