From a14b67100bc5d8d7a3c43ee97cc18cb5620fc629 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Mon, 27 Nov 2017 08:47:58 -0700 Subject: [PATCH] refactor following feedback --- wolfcrypt/src/integer.c | 3 ++- wolfcrypt/src/tfm.c | 3 ++- wolfssl/wolfcrypt/integer.h | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index cb5df1c58..68cc91a72 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -4729,7 +4729,8 @@ LBL_U:mp_clear (&v); #endif /* WOLFSSL_KEY_GEN */ -#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) +#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \ + defined(WOLFSSL_DEBUG_MATH) || defined(DEBUG_WOLFSSL) /* chars used in radix conversions */ const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\ diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index a41d5f3b8..8b81a4aac 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -3076,7 +3076,8 @@ int mp_add_d(fp_int *a, fp_digit b, fp_int *c) #endif /* HAVE_ECC || !NO_PWDBASED */ -#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) +#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \ + defined(WOLFSSL_DEBUG_MATH) || defined(DEBUG_WOLFSSL) /* chars used in radix conversions */ static const char* const fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" diff --git a/wolfssl/wolfcrypt/integer.h b/wolfssl/wolfcrypt/integer.h index cf8069bc7..7b7c5c04a 100644 --- a/wolfssl/wolfcrypt/integer.h +++ b/wolfssl/wolfcrypt/integer.h @@ -261,7 +261,10 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat); #define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) +#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \ + defined(WOLFSSL_DEBUG_MATH) || defined(DEBUG_WOLFSSL) extern const char *mp_s_rmap; +#endif /* 6 functions needed by Rsa */ MP_API int mp_init (mp_int * a);