forked from wolfSSL/wolfssl
adjust test cases
This commit is contained in:
12
tests/api.c
12
tests/api.c
@@ -10065,18 +10065,14 @@ static int test_wc_Chacha_Process (void)
|
|||||||
AssertIntEQ(ret, 0);
|
AssertIntEQ(ret, 0);
|
||||||
AssertIntEQ(XMEMCMP(expected, cipher, 64), 0);
|
AssertIntEQ(XMEMCMP(expected, cipher, 64), 0);
|
||||||
|
|
||||||
ret = wc_Chacha_Process(&enc, cipher, input2 + 64, 64);
|
ret = wc_Chacha_Process(&enc, cipher, input2 + 64, 128);
|
||||||
AssertIntEQ(ret, 0);
|
AssertIntEQ(ret, 0);
|
||||||
AssertIntEQ(XMEMCMP(expected + 64, cipher, 64), 0);
|
AssertIntEQ(XMEMCMP(expected + 64, cipher, 128), 0);
|
||||||
|
|
||||||
/* partial */
|
/* partial */
|
||||||
ret = wc_Chacha_Process(&enc, cipher, input2 + 128, 32);
|
ret = wc_Chacha_Process(&enc, cipher, input2 + 192, 32);
|
||||||
AssertIntEQ(ret, 0);
|
AssertIntEQ(ret, 0);
|
||||||
AssertIntEQ(XMEMCMP(expected + 128, cipher, 32), 0);
|
AssertIntEQ(XMEMCMP(expected + 192, cipher, 32), 0);
|
||||||
|
|
||||||
ret = wc_Chacha_Process(&enc, cipher, input2 + 160, 64);
|
|
||||||
AssertIntEQ(ret, 0);
|
|
||||||
AssertIntEQ(XMEMCMP(expected + 160, cipher, 64), 0);
|
|
||||||
|
|
||||||
ret = wc_Chacha_Process(&enc, cipher, input2 + 224, 32);
|
ret = wc_Chacha_Process(&enc, cipher, input2 + 224, 32);
|
||||||
AssertIntEQ(ret, 0);
|
AssertIntEQ(ret, 0);
|
||||||
|
@@ -5036,7 +5036,12 @@ int chacha20_poly1305_aead_test(void)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
ChaChaPoly_Aead aead;
|
ChaChaPoly_Aead aead;
|
||||||
|
|
||||||
|
#if !defined(USE_INTEL_CHACHA_SPEEDUP) && !defined(WOLFSSL_ARMASM)
|
||||||
#define TEST_SMALL_CHACHA_CHUNKS 32
|
#define TEST_SMALL_CHACHA_CHUNKS 32
|
||||||
|
#else
|
||||||
|
#define TEST_SMALL_CHACHA_CHUNKS 64
|
||||||
|
#endif
|
||||||
#ifdef TEST_SMALL_CHACHA_CHUNKS
|
#ifdef TEST_SMALL_CHACHA_CHUNKS
|
||||||
word32 testLen;
|
word32 testLen;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user