Skip to content
Merged
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
35 changes: 19 additions & 16 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -12512,7 +12512,7 @@ static wc_test_ret_t EVP_test(const WOLFSSL_EVP_CIPHER* type, const byte* key,
ret = EVP_test(wolfSSL_EVP_aes_128_cfb8(), key1, iv, msg1, sizeof(msg1),
cipher1, sizeof(cipher1));
if (ret != 0) {
return ret;
ERROR_OUT(ret, out);
}
#endif
ret = wc_AesSetKey(enc, key1, WC_AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
Expand Down Expand Up @@ -12559,7 +12559,7 @@ static wc_test_ret_t EVP_test(const WOLFSSL_EVP_CIPHER* type, const byte* key,
ret = EVP_test(wolfSSL_EVP_aes_192_cfb8(), key2, iv2, msg2, sizeof(msg2),
cipher2, sizeof(msg2));
if (ret != 0) {
return ret;
ERROR_OUT(ret, out);
}
#endif

Expand Down Expand Up @@ -25720,6 +25720,18 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)

exit_rsa:

(void)res;
(void)bytes;
(void)idx;
(void)in;
(void)out;
(void)plain;
(void)idx;
(void)inStr;
(void)inLen;
(void)outSz;
(void)plainSz;

#if !defined(WOLFSSL_NO_MALLOC)
XFREE(der, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
#if defined(WOLFSSL_CERT_REQ)
Expand Down Expand Up @@ -25748,18 +25760,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
WC_FREE_VAR(out, HEAP_HINT);
WC_FREE_VAR(plain, HEAP_HINT);

(void)res;
(void)bytes;
(void)idx;
(void)in;
(void)out;
(void)plain;
(void)idx;
(void)inStr;
(void)inLen;
(void)outSz;
(void)plainSz;

/* ret can be greater then 0 with certgen but all negative values should
* be returned and treated as an error */
if (ret >= 0) {
Expand Down Expand Up @@ -28242,8 +28242,11 @@ static wc_test_ret_t openssl_aes_test(void)
int num = 0;

#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc == NULL) || (dec == NULL))
if ((enc == NULL) || (dec == NULL)) {
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_AES);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_AES);
return MEMORY_E;
}
#endif

XMEMCPY(iv, setIv, sizeof(setIv));
Expand Down Expand Up @@ -37576,7 +37579,7 @@ static wc_test_ret_t ecc_ctx_kdf_salt_test(WC_RNG* rng, ecc_key* a, ecc_key* b)
}

XMEMSET(plaintext, 0, MAX_ECIES_TEST_SZ);
XSTRLCPY((char *)plaintext, message, sizeof plaintext);
XSTRLCPY((char *)plaintext, message, MAX_ECIES_TEST_SZ);
plaintextLen = (((word32)XSTRLEN(message) + WC_AES_BLOCK_SIZE - 1) /
WC_AES_BLOCK_SIZE) * WC_AES_BLOCK_SIZE;

Expand Down