Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] remove old, unused, and currently broken alternate k1 ECC impls #243

Merged
merged 1 commit into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions libraries/libfc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
set( ECC_IMPL secp256k1 CACHE STRING "secp256k1 or openssl or mixed" )

add_subdirectory( secp256k1 )

set( WITH_PROCPS OFF CACHE BOOL "" FORCE)
Expand All @@ -9,17 +7,6 @@ set( IS_LIBFF_PARENT OFF CACHE BOOL "" FORCE)
set( FF_INSTALL_COMPONENT "${FC_INSTALL_COMPONENT}")
add_subdirectory( libraries/ff )

if( ECC_IMPL STREQUAL openssl )
set( ECC_REST src/crypto/elliptic_impl_pub.cpp )
else( ECC_IMPL STREQUAL openssl )
set( ECC_LIB secp256k1 )
if( ECC_IMPL STREQUAL mixed )
set( ECC_REST src/crypto/elliptic_impl_priv.cpp src/crypto/elliptic_impl_pub.cpp )
else( ECC_IMPL STREQUAL mixed )
set( ECC_REST src/crypto/elliptic_impl_priv.cpp )
endif( ECC_IMPL STREQUAL mixed )
endif( ECC_IMPL STREQUAL openssl )

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
Expand Down Expand Up @@ -69,8 +56,8 @@ set( fc_sources
src/crypto/dh.cpp
src/crypto/blowfish.cpp
src/crypto/elliptic_common.cpp
${ECC_REST}
src/crypto/elliptic_${ECC_IMPL}.cpp
src/crypto/elliptic_impl_priv.cpp
src/crypto/elliptic_secp256k1.cpp
src/crypto/elliptic_r1.cpp
src/crypto/elliptic_webauthn.cpp
src/crypto/rand.cpp
Expand Down Expand Up @@ -140,7 +127,7 @@ if(APPLE)
endif()
target_link_libraries( fc PUBLIC ff
Boost::date_time Boost::filesystem Boost::chrono Boost::iostreams Threads::Threads
OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB ${PLATFORM_SPECIFIC_LIBS} ${CMAKE_DL_LIBS} ${ECC_LIB} ${security_framework} ${corefoundation_framework} )
OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB ${PLATFORM_SPECIFIC_LIBS} ${CMAKE_DL_LIBS} secp256k1 ${security_framework} ${corefoundation_framework} )

# Critically, this ensures that OpenSSL 1.1 & 3.0 both have a variant of BN_zero() with void return value. But it also allows access
# to some obsoleted AES functions in 3.0 too, since 3.0's API_COMPAT is effectively 3.0 by default
Expand Down
Loading