-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1599 from AntelopeIO/boringssl
Replace OpenSSL dependency with pinned BoringSSL
- Loading branch information
Showing
16 changed files
with
68 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,15 +54,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "ON") | |
set(BUILD_DOXYGEN FALSE CACHE BOOL "Build doxygen documentation on every make") | ||
set(ENABLE_MULTIVERSION_PROTOCOL_TEST FALSE CACHE BOOL "Enable nodeos multiversion protocol test") | ||
|
||
# add defaults for openssl | ||
if(APPLE AND UNIX AND "${OPENSSL_ROOT_DIR}" STREQUAL "") | ||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") | ||
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/openssl@3;/opt/homebrew/opt/[email protected]") | ||
else() | ||
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl@3;/usr/local/opt/[email protected]") | ||
endif() | ||
endif() | ||
|
||
option(ENABLE_OC "Enable eosvm-oc on supported platforms" ON) | ||
|
||
# WASM runtimes to enable. Each runtime in this list will have: | ||
|
@@ -180,6 +171,10 @@ if( ENABLE_TCMALLOC ) | |
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} ${GPERFTOOLS_TCMALLOC}") | ||
endif() | ||
|
||
# leap includes a bundled BoringSSL which conflicts with OpenSSL. Make sure any other bundled libraries (such as boost) | ||
# do not attempt to use an external OpenSSL in any manner | ||
set(CMAKE_DISABLE_FIND_PACKAGE_OpenSSL On) | ||
|
||
add_subdirectory( libraries ) | ||
add_subdirectory( plugins ) | ||
add_subdirectory( programs ) | ||
|
@@ -226,6 +221,7 @@ configure_file(libraries/eos-vm/LICENSE licen | |
configure_file(libraries/prometheus/prometheus-cpp/LICENSE licenses/leap/LICENSE.prom COPYONLY) | ||
configure_file(programs/cleos/LICENSE.CLI11 licenses/leap/LICENSE.CLI11 COPYONLY) | ||
configure_file(libraries/libfc/libraries/bls12-381/LICENSE licenses/leap/LICENSE.bls12-381 COPYONLY) | ||
configure_file(libraries/libfc/libraries/boringssl/boringssl/src/LICENSE licenses/leap/LICENSE.boringssl COPYONLY) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/licenses/leap" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/" COMPONENT base) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ pkg update && pkg install \ | |
curl \ | ||
boost-all \ | ||
python3 \ | ||
openssl \ | ||
llvm11 \ | ||
pkgconf | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
add_subdirectory(boringssl EXCLUDE_FROM_ALL) | ||
target_compile_options(fipsmodule PRIVATE -Wno-error) | ||
target_compile_options(crypto PRIVATE -Wno-error) | ||
target_compile_options(decrepit PRIVATE -Wno-error) | ||
|
||
#paranoia for when a dependent library depends on openssl (such as libcurl) | ||
set_target_properties(fipsmodule PROPERTIES C_VISIBILITY_PRESET hidden) | ||
set_target_properties(crypto PROPERTIES C_VISIBILITY_PRESET hidden) | ||
set_target_properties(decrepit PROPERTIES C_VISIBILITY_PRESET hidden) | ||
|
||
add_library(boringssl INTERFACE) | ||
target_link_libraries(boringssl INTERFACE crypto decrepit) | ||
target_include_directories(boringssl INTERFACE boringssl/src/include) | ||
|
||
# avoid conflict with system lib | ||
set_target_properties(crypto PROPERTIES PREFIX libbs) | ||
|
||
install( TARGETS crypto | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL | ||
) | ||
|
||
install( TARGETS decrepit | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL | ||
) | ||
|
||
install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/boringssl/src/include/" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/leapboringssl" COMPONENT dev EXCLUDE_FROM_ALL ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters