diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c
index 5a79191b6..da58dd0a6 100644
--- a/wolfcrypt/src/integer.c
+++ b/wolfcrypt/src/integer.c
@@ -4535,12 +4535,14 @@ LBL_U:mp_clear (&v);
#endif /* WOLFSSL_KEY_GEN */
-#ifdef HAVE_ECC
+#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY)
/* chars used in radix conversions */
const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\
abcdefghijklmnopqrstuvwxyz+/";
+#endif
+#ifdef HAVE_ECC
/* read a string [ASCII] in a given radix */
int mp_read_radix (mp_int * a, const char *str, int radix)
{
diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c
index 5c5f60bda..7e45f1f6d 100755
--- a/wolfcrypt/src/tfm.c
+++ b/wolfcrypt/src/tfm.c
@@ -2264,6 +2264,7 @@ static const int lnz[16] = {
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
};
+#ifdef WOLFSSL_KEY_GEN
/* swap the elements of two integers, for cases where you can't simply swap the
* mp_int pointers around
*/
@@ -2275,6 +2276,7 @@ static void fp_exch (fp_int * a, fp_int * b)
*a = *b;
*b = t;
}
+#endif
/* Counts the number of lsbs which are zero before the first zero bit */
int fp_cnt_lsb(fp_int *a)
@@ -2724,12 +2726,14 @@ int mp_add_d(fp_int *a, fp_digit b, fp_int *c)
#endif /* HAVE_ECC || !NO_PWDBASED */
-#ifdef HAVE_ECC
+#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY)
/* chars used in radix conversions */
static const char *fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\
abcdefghijklmnopqrstuvwxyz+/";
+#endif
+#ifdef HAVE_ECC
static int fp_read_radix(fp_int *a, const char *str, int radix)
{
int y, neg;
@@ -2842,6 +2846,7 @@ int mp_cnt_lsb(fp_int* a)
#endif /* HAVE_COMP_KEY */
+#endif /* HAVE_ECC */
#if defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY)
@@ -2953,7 +2958,5 @@ int mp_toradix (mp_int *a, char *str, int radix)
#endif /* defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) */
-#endif /* HAVE_ECC */
-
#endif /* USE_FAST_MATH */
diff --git a/wolfssl.vcproj b/wolfssl.vcproj
index b4a4543ad..f81f47fbd 100755
--- a/wolfssl.vcproj
+++ b/wolfssl.vcproj
@@ -291,6 +291,10 @@
RelativePath=".\src\tls.c"
>
+
+
+
diff --git a/wolfssl/wolfcrypt/integer.h b/wolfssl/wolfcrypt/integer.h
index 8e43a395b..16ee0cc7b 100644
--- a/wolfssl/wolfcrypt/integer.h
+++ b/wolfssl/wolfcrypt/integer.h
@@ -307,7 +307,7 @@ int mp_radix_size (mp_int * a, int radix, int *size);
#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN)
int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c);
#endif
-#ifdef HAVE_ECC
+#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN)
int mp_read_radix(mp_int* a, const char* str, int radix);
#endif
diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h
index 060ed0239..0675af337 100644
--- a/wolfssl/wolfcrypt/types.h
+++ b/wolfssl/wolfcrypt/types.h
@@ -215,7 +215,7 @@
#ifndef CTYPE_USER
#include
- #if defined(HAVE_ECC) || defined(HAVE_OCSP)
+ #if defined(HAVE_ECC) || defined(HAVE_OCSP) || defined(WOLFSSL_KEY_GEN)
#define XTOUPPER(c) toupper((c))
#define XISALPHA(c) isalpha((c))
#endif