Fix for HAVE_ECC_CDH wolfCrypt test with async using the wrong size for x and y. With async the sizeof(sharedA) == 8 and it should be ECC_SHARED_SIZE.

This commit is contained in:
David Garske
2019-03-28 18:48:32 -07:00
parent b0d65d2a3e
commit 1906179a1b

View File

@ -16175,7 +16175,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
wc_ecc_set_flags(&userA, WC_ECC_FLAG_COFACTOR);
wc_ecc_set_flags(&userB, WC_ECC_FLAG_COFACTOR);
x = sizeof(sharedA);
x = ECC_SHARED_SIZE;
do {
#if defined(WOLFSSL_ASYNC_CRYPT)
ret = wc_AsyncWait(ret, &userA.asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
@ -16187,7 +16187,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
goto done;
}
y = sizeof(sharedB);
y = ECC_SHARED_SIZE;
do {
#if defined(WOLFSSL_ASYNC_CRYPT)
ret = wc_AsyncWait(ret, &userB.asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);