diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index cc5a01e13..e92573278 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1295,7 +1295,7 @@ static void bench_stats_sym_finish(const char* desc, int doAsync, int count, } } - /* caclulcate blocks per second */ + /* calculate blocks per second */ if (total > 0) { persec = (1 / total) * blocks; } diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 99cd6c627..08b65eee4 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -12722,7 +12722,8 @@ int sp_todecimal(sp_int* a, char* str) } #endif /* WOLFSSL_SP_MATH_ALL || WOLFSSL_KEY_GEN || HAVE_COMP_KEY */ -#if defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY) +#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \ + defined(WC_MP_TO_RADIX) /* Put the string version, big-endian, of a in str using the given radix. * * @param [in] a SP integer to convert. @@ -12755,9 +12756,10 @@ int sp_toradix(sp_int* a, char* str, int radix) return err; } -#endif /* WOLFSSL_SP_MATH_ALL */ +#endif /* (WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY) || WC_MP_TO_RADIX */ -#if defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY) +#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \ + defined(WC_MP_TO_RADIX) /* Calculate the length of the string version, big-endian, of a using the given * radix. * @@ -12848,7 +12850,7 @@ int sp_radix_size(sp_int* a, int radix, int* size) return err; } -#endif /* WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY */ +#endif /* (WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY) || WC_MP_TO_RADIX */ /*************************************** * Prime number generation and checking. diff --git a/wolfssl/wolfcrypt/sp_int.h b/wolfssl/wolfcrypt/sp_int.h index fd5ec9b9b..a48d5ad5d 100644 --- a/wolfssl/wolfcrypt/sp_int.h +++ b/wolfssl/wolfcrypt/sp_int.h @@ -881,7 +881,7 @@ MP_API int sp_to_unsigned_bin_at_pos(int o, sp_int* a, unsigned char* out); MP_API int sp_read_radix(sp_int* a, const char* in, int radix); MP_API int sp_tohex(sp_int* a, char* str); MP_API int sp_todecimal(mp_int* a, char* str); -#ifdef WOLFSSL_SP_MATH_ALL +#if defined(WOLFSSL_SP_MATH_ALL) || defined(WC_MP_TO_RADIX) MP_API int sp_toradix(mp_int* a, char* str, int radix); MP_API int sp_radix_size(mp_int* a, int radix, int* size); #endif