diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index d22dd82bc..103eecfda 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -2845,7 +2845,7 @@ int sp_set_bit(sp_int* a, int i) * WOLFSSL_KEY_GEN || OPENSSL_EXTRA || !NO_RSA */ #if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \ - defined(WOLFSSL_KEY_GEN) + defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) /* Exponentiate 2 to the power of e: a = 2^e * This is done by setting the 'e'th bit. * @@ -2870,7 +2870,7 @@ int sp_2expt(sp_int* a, int e) return err; } #endif /* (WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY) || - * WOLFSSL_KEY_GEN */ + * WOLFSSL_KEY_GEN || !NO_DH */ /********************** * Digit/Long functions diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 1d6e8acab..4edd94be2 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -34021,7 +34021,7 @@ static int mp_test_param(mp_int* a, mp_int* b, mp_int* r, WC_RNG* rng) return -12766; #endif -#if defined(WOLFSSL_KEY_GEN) +#if defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) ret = sp_2expt(NULL, 1); if (ret != MP_VAL) return -12767;