Skip to content

Commit

Permalink
Addressing CI/CD before continuing with the fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed Nov 28, 2024
1 parent 2d7de44 commit bf57d71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4871,8 +4871,10 @@ int wolfSSL_PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
passlen = (int)XSTRLEN(pass);
}

enum wc_HashType pbkdf2HashType = EvpMd2MacType(digest);

ret = wc_PBKDF2((byte*)out, (byte*)pass, passlen, (byte*)salt, saltlen,
iter, keylen, (int)EvpMd2MacType(digest));
iter, keylen, pbkdf2HashType);
if (ret == 0)
return WOLFSSL_SUCCESS;
else
Expand Down
11 changes: 6 additions & 5 deletions wolfcrypt/src/port/Renesas/renesas_fspsm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ static int fspsm_ServerKeyExVerify(uint32_t type, WOLFSSL* ssl,
}
/* make peer ecc key data for SCE */
/* 0padding(24bit) || 04(8bit) || Qx(256bit) || Qy(256bit) */
peerkey = (byte*)XMALLOC((3 + 1 + qxLen + qyLen), NULL, DYNAMIC_TYPE_TMP_BUFFER);
peerkey = (byte*)XMALLOC((3 + 1 + qxLen + qyLen), NULL,
DYNAMIC_TYPE_TMP_BUFFER);
if (peerkey == NULL) {
WOLFSSL_MSG("failed to malloc ecc key");
return WOLFSSL_FAILURE;
Expand Down Expand Up @@ -336,7 +337,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 +372,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 @@ -1019,7 +1020,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 +1072,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 bf57d71

Please sign in to comment.