Only expose ECC APIs on config define

This commit is contained in:
Sean Parkinson 2017-03-17 10:52:38 +10:00
parent 37a52414cc
commit 461f051ef1
2 changed files with 12 additions and 7 deletions

View File

@ -341,7 +341,7 @@ AC_ARG_ENABLE([wpas],
if test "$ENABLED_WPAS" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_SECRET_CALLBACK -DWOLFSSL_STATIC_RSA"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PUBLIC_MP -DWOLFSSL_PUBLIC_ECC_ADD_DBL"
AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WPAS"
fi

View File

@ -291,12 +291,17 @@ const char* wc_ecc_get_name(int curve_id);
#ifndef WOLFSSL_ATECC508A
WOLFSSL_API int ecc_map(ecc_point*, mp_int*, mp_digit);
WOLFSSL_API int ecc_projective_add_point(ecc_point* P, ecc_point* Q,
ecc_point* R, mp_int* a,
mp_int* modulus, mp_digit mp);
WOLFSSL_API int ecc_projective_dbl_point(ecc_point* P, ecc_point* R, mp_int* a,
mp_int* modulus, mp_digit mp);
#ifdef WOLFSSL_PUBLIC_ECC_ADD_DBL
#define ECC_API WOLFSSL_API
#else
#define ECC_API WOLFSSL_LOCAL
#endif
ECC_API int ecc_map(ecc_point*, mp_int*, mp_digit);
ECC_API int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R,
mp_int* a, mp_int* modulus, mp_digit mp);
ECC_API int ecc_projective_dbl_point(ecc_point* P, ecc_point* R, mp_int* a,
mp_int* modulus, mp_digit mp);
#endif