diff --git a/src/ssl_bn.c b/src/ssl_bn.c index caea92027..a73d4ebad 100644 --- a/src/ssl_bn.c +++ b/src/ssl_bn.c @@ -575,6 +575,18 @@ char* wolfSSL_BN_bn2hex(const WOLFSSL_BIGNUM *bn) */ static int wolfssl_bn_radix2bn(WOLFSSL_BIGNUM** bn, const char* str, int radix) { +#if defined(USE_FAST_MATH) && (!defined(OPENSSL_EXTRA) && defined(NO_DSA) && \ + !defined(HAVE_ECC)) + /* in this build case mp_read_radix is not available */ + WOLFSSL_ENTER("wolfSSL_BN_bn2dec"); + WOLFSSL_MSG("BN mp_read_radix not available"); + + (void)bn; + (void)str; + (void)radix; + + return 0; +#else int ret = 1; WOLFSSL_BIGNUM* a = NULL; @@ -608,6 +620,7 @@ static int wolfssl_bn_radix2bn(WOLFSSL_BIGNUM** bn, const char* str, int radix) *bn = NULL; } return ret; +#endif } /* Decode hex string into a big number. diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index c714cc7d1..a919a0fbb 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -5510,7 +5510,7 @@ static wcchar fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz+/"; #endif -#if !defined(NO_DSA) || defined(HAVE_ECC) +#if defined(OPENSSL_EXTRA) || !defined(NO_DSA) || defined(HAVE_ECC) #if DIGIT_BIT == 64 || DIGIT_BIT == 32 static int fp_read_radix_16(fp_int *a, const char *str) { diff --git a/wolfssl/wolfcrypt/tfm.h b/wolfssl/wolfcrypt/tfm.h index 7ec518b79..8c55535d1 100644 --- a/wolfssl/wolfcrypt/tfm.h +++ b/wolfssl/wolfcrypt/tfm.h @@ -812,7 +812,7 @@ MP_API int mp_radix_size (mp_int * a, int radix, int *size); #define mp_dump(desc, a, verbose) #endif -#if !defined(NO_DSA) || defined(HAVE_ECC) +#if defined(OPENSSL_EXTRA) || !defined(NO_DSA) || defined(HAVE_ECC) MP_API int mp_read_radix(mp_int* a, const char* str, int radix); #endif