From af8feed5310de5c1750a906c63e158c8e7d42609 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 19 Sep 2024 17:44:08 -0500 Subject: [PATCH] Revert "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." This reverts commit a31e914b987c8322fb6da1ab389dbd469dae2cf3. --- wolfssl/wolfcrypt/ecc.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index 1c219f9728..ba8c88b882 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -654,15 +654,10 @@ WOLFSSL_ABI WOLFSSL_API void wc_ecc_key_free(ecc_key* key); WOLFSSL_API const char* wc_ecc_get_name(int curve_id); -#define ECC_API WOLFSSL_API -#ifndef WOLFSSL_PUBLIC_ECC_ADD_DBL - #define ecc_mul2add wc_ecc_mul2add - #define ecc_map wc_ecc_map - #define ecc_map_ex wc_ecc_map_ex - #define ecc_projective_add_point wc_ecc_projective_add_point - #define ecc_projective_dbl_point wc_ecc_projective_dbl_point - #define ecc_projective_add_point_safe wc_ecc_projective_add_point_safe - #define ecc_projective_dbl_point_safe wc_ecc_projective_dbl_point_safe +#ifdef WOLFSSL_PUBLIC_ECC_ADD_DBL + #define ECC_API WOLFSSL_API +#else + #define ECC_API WOLFSSL_LOCAL #endif ECC_API int ecc_mul2add(ecc_point* A, mp_int* kA, @@ -766,7 +761,7 @@ WOLFSSL_API int wc_ecc_init_label(ecc_key* key, const char* label, void* heap, int devId); #endif #ifdef WOLFSSL_CUSTOM_CURVES -WOLFSSL_API +WOLFSSL_LOCAL void wc_ecc_free_curve(const ecc_set_type* curve, void* heap); #endif WOLFSSL_ABI WOLFSSL_API @@ -835,10 +830,10 @@ int wc_ecc_point_is_on_curve(ecc_point *p, int curve_idx); WOLFSSL_API int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a, mp_int* modulus, int map); -WOLFSSL_API +ECC_API int wc_ecc_mulmod_ex(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a, mp_int* modulus, int map, void* heap); -WOLFSSL_API +ECC_API int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a, mp_int* modulus, mp_int* order, WC_RNG* rng, int map, void* heap);