Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RA6M4 jankins failure #8297

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading