File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -856,6 +856,14 @@ enum {
856856/* This holds the key settings.
857857 ***MUST*** be organized by size from smallest to largest. */
858858
859+ #if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(6,0,0)
860+ #undef ecc_sets
861+ #undef ecc_sets_count
862+ #endif
863+
864+ #if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(6,0,0)
865+ static
866+ #endif
859867const ecc_set_type ecc_sets[] = {
860868#ifdef ECC112
861869 #ifndef NO_ECC_SECP
@@ -1399,8 +1407,17 @@ const ecc_set_type ecc_sets[] = {
13991407 }
14001408};
14011409#define ECC_SET_COUNT (sizeof(ecc_sets)/sizeof(ecc_set_type))
1410+ #if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(6,0,0)
1411+ static
1412+ #endif
14021413const size_t ecc_sets_count = ECC_SET_COUNT - 1;
14031414
1415+ const ecc_set_type *wc_ecc_get_sets(void) {
1416+ return ecc_sets;
1417+ }
1418+ size_t wc_ecc_get_sets_count(void) {
1419+ return ecc_sets_count;
1420+ }
14041421
14051422#ifdef HAVE_OID_ENCODING
14061423 /* encoded OID cache */
Original file line number Diff line number Diff line change @@ -34481,7 +34481,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ecc_test_buffers(void)
3448134481 } while (ret == WC_NO_ERR_TRACE(WC_PENDING_E));
3448234482 if (ret < 0)
3448334483 ERROR_OUT(WC_TEST_RET_ENC_EC(ret), done);
34484- TEST_SLEEP();
34484+ TEST_SLEEP();
3448534485
3448634486 XMEMSET(plain, 0, sizeof(plain));
3448734487
Original file line number Diff line number Diff line change @@ -641,8 +641,15 @@ WOLFSSL_ABI WOLFSSL_API void wc_ecc_key_free(ecc_key* key);
641641
642642
643643/* ECC predefined curve sets */
644- extern const ecc_set_type ecc_sets [];
645- extern const size_t ecc_sets_count ;
644+ #if defined(HAVE_FIPS ) && FIPS_VERSION3_LT (6 ,0 ,0 )
645+ extern const ecc_set_type ecc_sets [];
646+ extern const size_t ecc_sets_count ;
647+ #else
648+ WOLFSSL_API const ecc_set_type * wc_ecc_get_sets (void );
649+ WOLFSSL_API size_t wc_ecc_get_sets_count (void );
650+ #define ecc_sets wc_ecc_get_sets()
651+ #define ecc_sets_count wc_ecc_get_sets_count()
652+ #endif
646653
647654WOLFSSL_API
648655const char * wc_ecc_get_name (int curve_id );
@@ -763,7 +770,7 @@ WOLFSSL_API
763770int wc_ecc_set_flags (ecc_key * key , word32 flags );
764771WOLFSSL_ABI WOLFSSL_API
765772void wc_ecc_fp_free (void );
766- WOLFSSL_LOCAL
773+ WOLFSSL_API
767774void wc_ecc_fp_init (void );
768775WOLFSSL_API
769776int wc_ecc_set_rng (ecc_key * key , WC_RNG * rng );
You can’t perform that action at this time.
0 commit comments