Support for mp_dump with SP Math ALL.

This commit is contained in:
David Garske
2021-01-06 16:43:49 -08:00
parent f5509780c6
commit 8c91a0c6b0

View File

@@ -156,7 +156,7 @@ extern "C" {
#endif
/* Detemine the number of bits to use in each word. */
/* Determine the number of bits to use in each word. */
#ifdef SP_WORD_SIZE
#elif defined(WOLFSSL_DSP_BUILD)
#define SP_WORD_SIZE 32
@@ -510,7 +510,7 @@ typedef struct sp_ecc_ctx {
#define sp_print_digit(a, s)
#define sp_print_int(a, s)
#endif
#endif /* !NO_FILESYSTEM */
/* Returns whether multi-precision number is odd
*
@@ -978,8 +978,16 @@ WOLFSSL_API word32 CheckRunTimeFastMath(void);
#define mp_gcd sp_gcd
#define mp_lcm sp_lcm
#ifdef WOLFSSL_DEBUG_MATH
static inline void mp_dump(const char* desc, mp_int* a, byte verbose)
{
sp_print(a, desc);
(void)verbose;
}
#endif
#endif /* WOLFSSL_SP_MATH || WOLFSSL_SP_MATH_ALL */
#ifdef __cplusplus
} /* extern "C" */
#endif