Skip to content

Commit a31e914

Browse files
committed
wolfssl/wolfcrypt/ecc.h: fixes for more linker relocation errors in Fedora packaging test: always export ECC_API functions, but when !WOLFSSL_PUBLIC_ECC_ADD_DBL, remap them with wc_ prefixes.
1 parent da1b835 commit a31e914

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

wolfssl/wolfcrypt/ecc.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,15 @@ WOLFSSL_ABI WOLFSSL_API void wc_ecc_key_free(ecc_key* key);
654654
WOLFSSL_API
655655
const char* wc_ecc_get_name(int curve_id);
656656

657-
#ifdef WOLFSSL_PUBLIC_ECC_ADD_DBL
658-
#define ECC_API WOLFSSL_API
659-
#else
660-
#define ECC_API WOLFSSL_LOCAL
657+
#define ECC_API WOLFSSL_API
658+
#ifndef WOLFSSL_PUBLIC_ECC_ADD_DBL
659+
#define ecc_mul2add wc_ecc_mul2add
660+
#define ecc_map wc_ecc_map
661+
#define ecc_map_ex wc_ecc_map_ex
662+
#define ecc_projective_add_point wc_ecc_projective_add_point
663+
#define ecc_projective_dbl_point wc_ecc_projective_dbl_point
664+
#define ecc_projective_add_point_safe wc_ecc_projective_add_point_safe
665+
#define ecc_projective_dbl_point_safe wc_ecc_projective_dbl_point_safe
661666
#endif
662667

663668
ECC_API int ecc_mul2add(ecc_point* A, mp_int* kA,
@@ -761,7 +766,7 @@ WOLFSSL_API
761766
int wc_ecc_init_label(ecc_key* key, const char* label, void* heap, int devId);
762767
#endif
763768
#ifdef WOLFSSL_CUSTOM_CURVES
764-
WOLFSSL_LOCAL
769+
WOLFSSL_API
765770
void wc_ecc_free_curve(const ecc_set_type* curve, void* heap);
766771
#endif
767772
WOLFSSL_ABI WOLFSSL_API
@@ -830,10 +835,10 @@ int wc_ecc_point_is_on_curve(ecc_point *p, int curve_idx);
830835
WOLFSSL_API
831836
int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R,
832837
mp_int* a, mp_int* modulus, int map);
833-
ECC_API
838+
WOLFSSL_API
834839
int wc_ecc_mulmod_ex(const mp_int* k, ecc_point *G, ecc_point *R,
835840
mp_int* a, mp_int* modulus, int map, void* heap);
836-
ECC_API
841+
WOLFSSL_API
837842
int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
838843
mp_int* modulus, mp_int* order, WC_RNG* rng, int map,
839844
void* heap);

0 commit comments

Comments
 (0)