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
6 changes: 3 additions & 3 deletions tests/api/test_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ int test_wc_AesCtrEncryptDecrypt(void)
};
#endif
#if defined(WOLFSSL_AES_128)
byte expected16[CBC_LEN] = {
byte expected16[CTR_LEN] = {
0x46, 0x1a, 0x5f, 0xfd, 0x9d, 0xf7, 0x91, 0x71,
0x35, 0x8e, 0x9e, 0x01, 0x77, 0xd8, 0x4e, 0xaa,
0x5f, 0x1f, 0x16, 0x26, 0xf9, 0xcd, 0xee, 0x15,
Expand All @@ -2239,7 +2239,7 @@ int test_wc_AesCtrEncryptDecrypt(void)
0xe4, 0x01, 0x2c, 0xd0, 0x82, 0xe2, 0x7a, 0x4a,
};
#elif defined(WOLFSSL_AES_192)
byte expected24[CBC_LEN] = {
byte expected24[CTR_LEN] = {
0x7b, 0xde, 0x53, 0xac, 0x88, 0x24, 0xe6, 0xde,
0x68, 0xd4, 0x64, 0x18, 0x20, 0x96, 0x62, 0x68,
0xb4, 0xc8, 0x6c, 0xa1, 0xae, 0xcc, 0x1e, 0x74,
Expand All @@ -2260,7 +2260,7 @@ int test_wc_AesCtrEncryptDecrypt(void)
0x5a, 0x4d, 0x6d, 0x7f, 0xfe, 0xb8, 0xaa, 0x9b,
};
#else
byte expected32[CBC_LEN] = {
byte expected32[CTR_LEN] = {
0x18, 0x5a, 0x48, 0xfd, 0xb7, 0xd5, 0x35, 0xf3,
0x3f, 0xb9, 0x14, 0x16, 0xf3, 0x05, 0xf3, 0x71,
0x72, 0x84, 0x88, 0x9a, 0x51, 0xe2, 0x97, 0xaa,
Expand Down
4 changes: 3 additions & 1 deletion wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -16492,7 +16492,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)

int alen = 0;
int plen = 0;
#ifdef ENABLE_NON_12BYTE_IV_TEST
#if defined(ENABLE_NON_12BYTE_IV_TEST) && defined(WOLFSSL_AES_128)
int tlen = 0;
#endif
#if defined(WOLFSSL_XILINX_CRYPT_VERSAL)
Expand Down Expand Up @@ -16918,12 +16918,14 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
}
#endif
#ifdef HAVE_AES_DECRYPT
ret = wc_AesGcmDecrypt(enc, resultP, resultC, sizeof(c3),
iv3, sizeof(iv3), resultT, tlen, a3, sizeof(a3));
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(p3, resultP, sizeof(p3)))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#endif
}

/* Large buffer test */
Expand Down