From c9125f9685210d8833f2c4b2d7345df786ff7ccc Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 25 Jan 2023 14:49:05 -0700 Subject: [PATCH] Fix building FIPSv2 with WOLFSSL_ECDSA_SET_K defined. --- wolfcrypt/test/test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 1c5e31792..b21398e45 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -23441,7 +23441,10 @@ static int ecc_test_sign_vectors(WC_RNG* rng) if (ret != 0) { goto done; } +#if (!defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) \ + && (HAVE_FIPS_VERSION > 2))) wc_ecc_set_flags(key, WC_ECC_FLAG_DEC_SIGN); +#endif ret = wc_ecc_sign_set_k(k, sizeof(k), key); if (ret != 0) {