From 1906179a1b78ed26852078dd46da171d33e5298d Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 28 Mar 2019 18:48:32 -0700 Subject: [PATCH] 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`. --- wolfcrypt/test/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index ef367bdd1..a1986a924 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -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);