Merge pull request #758 from kaleb-himes/mp_set

Fix for building with ECC disabled and DSA enabled with mp_set API.
pull/761/head
dgarske 2017-02-21 12:59:54 -08:00 committed by GitHub
commit c01fb8f655
2 changed files with 12 additions and 7 deletions

View File

@ -3026,12 +3026,6 @@ int mp_read_radix(mp_int *a, const char *str, int radix)
return fp_read_radix(a, str, radix);
}
/* fast math conversion */
void mp_set(fp_int *a, fp_digit b)
{
fp_set(a,b);
}
/* fast math conversion */
int mp_sqr(fp_int *A, fp_int *B)
{
@ -3077,6 +3071,14 @@ int mp_cnt_lsb(fp_int* a)
#endif /* HAVE_ECC */
#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DSA)
/* fast math conversion */
void mp_set(fp_int *a, fp_digit b)
{
fp_set(a,b);
}
#endif
#if defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \
defined(WOLFSSL_DEBUG_MATH)

View File

@ -660,7 +660,6 @@ int mp_radix_size (mp_int * a, int radix, int *size);
#ifdef HAVE_ECC
int mp_read_radix(mp_int* a, const char* str, int radix);
void mp_set(fp_int *a, fp_digit b);
int mp_sqr(fp_int *a, fp_int *b);
int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp);
int mp_montgomery_setup(fp_int *a, fp_digit *rho);
@ -668,6 +667,10 @@ int mp_radix_size (mp_int * a, int radix, int *size);
int mp_init_copy(fp_int * a, fp_int * b);
#endif
#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DSA)
void mp_set(fp_int *a, fp_digit b);
#endif
#if defined(HAVE_ECC) || defined(WOLFSSL_KEY_GEN)
int mp_sqrmod(mp_int* a, mp_int* b, mp_int* c);
int mp_montgomery_calc_normalization(mp_int *a, mp_int *b);