Skip to content
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
2 changes: 1 addition & 1 deletion src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15671,7 +15671,7 @@ int wolfSSL_CTX_set_servername_arg(WOLFSSL_CTX* ctx, void* arg)
int wolfSSL_CRYPTO_memcmp(const void *a, const void *b, size_t size)
{
if (!a || !b)
return 0;
return -1;
return ConstantCompare((const byte*)a, (const byte*)b, (int)size);
}

Expand Down
4 changes: 2 additions & 2 deletions wolfcrypt/src/asn.c
Original file line number Diff line number Diff line change
Expand Up @@ -9300,7 +9300,7 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz,
if (falcon == NULL)
return MEMORY_E;

if (wc_falcon_init(falcon) != 0) {
if (wc_falcon_init(falcon) == 0) {
tmpIdx = 0;
if (wc_falcon_set_level(falcon, 1) == 0) {
if (wc_Falcon_PrivateKeyDecode(key, &tmpIdx, falcon, keySz)
Expand Down Expand Up @@ -9387,7 +9387,7 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz,
if (sphincs == NULL)
return MEMORY_E;

if (wc_sphincs_init(sphincs) != 0) {
if (wc_sphincs_init(sphincs) == 0) {
tmpIdx = 0;
if (wc_sphincs_set_level_and_optim(sphincs, 1, FAST_VARIANT)
== 0) {
Expand Down
4 changes: 2 additions & 2 deletions wolfcrypt/src/pkcs7.c
Original file line number Diff line number Diff line change
Expand Up @@ -10494,7 +10494,7 @@ static int wc_PKCS7_DecryptKtri(wc_PKCS7* pkcs7, byte* in, word32 inSz,
DYNAMIC_TYPE_TMP_BUFFER);
#ifndef WC_NO_RSA_OAEP
if (encOID == RSAESOAEPk) {
if (!outKey) {
if (outKey) {
XFREE(outKey, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
}
Expand All @@ -10510,7 +10510,7 @@ static int wc_PKCS7_DecryptKtri(wc_PKCS7* pkcs7, byte* in, word32 inSz,
WC_FREE_VAR_EX(privKey, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
#ifndef WC_NO_RSA_OAEP
if (encOID == RSAESOAEPk) {
if (!outKey) {
if (outKey) {
XFREE(outKey, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
}
Expand Down