From 00f196d497040bf6394c7304db662940c0337c43 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 20 Dec 2023 11:30:17 -0800 Subject: [PATCH] Fix for invalid `dh_ffdhe_test` test with even P when using Intel QuickAssist. --- wolfcrypt/test/test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 0d1bf239c..dfa1ddeb4 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -20075,7 +20075,8 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name) ERROR_OUT(WC_TEST_RET_ENC_NC, done); } -#if defined(WOLFSSL_HAVE_SP_DH) || defined(USE_FAST_MATH) +#if (defined(WOLFSSL_HAVE_SP_DH) || defined(USE_FAST_MATH)) && \ + !defined(HAVE_INTEL_QA) /* Make p even */ key->p.dp[0] &= (mp_digit)-2; if (ret != 0) @@ -20107,7 +20108,7 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name) /* Getting here means success - set ret to 0. */ ret = 0; -#endif +#endif /* (SP DH or Fast Math) and not Intel QuickAssist */ done: