From aa3fb6f0d05d7dec2b01f33f500a0fff095f24ac Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 16 Apr 2021 09:41:29 -0700 Subject: [PATCH] Update visibility on a SP math function for DH. --- wolfcrypt/src/sp_int.c | 4 ++-- wolfcrypt/test/test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 2562bbefa..2ca65ef43 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -2855,7 +2855,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. * @@ -2880,7 +2880,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 a718ec676..269f93430 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -34799,7 +34799,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;