Skip to content

Commit

Permalink
Merge pull request #300 from truemedian/openssl-configure
Browse files Browse the repository at this point in the history
build: audit openssl configure, update to openssl 3.4.0
  • Loading branch information
truemedian authored Dec 27, 2024
2 parents 32b274b + 819ebb6 commit 12c8642
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ endif #### End of gmake ####
###############################################################################

CONFIGURE_FLAGS = \
-Wno-dev \
-DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \
-DWITH_AMALG=$(WITH_AMALG) \
-DWITH_LUA_ENGINE=$(WITH_LUA_ENGINE) \
Expand Down
21 changes: 18 additions & 3 deletions deps/openssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ if (WithSharedOpenSSL)
else (WithSharedOpenSSL)
message("Enabling Static OpenSSL")

set(OPENSSL_CONFIG_OPTIONS no-unit-test no-shared no-stdio no-idea no-mdc2 no-rc5 --prefix=${CMAKE_BINARY_DIR})
execute_process(
COMMAND openssl info -configdir
OUTPUT_VARIABLE OPENSSL_CONFIG_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(OPENSSL_CONFIG_OPTIONS no-tests no-shared no-pinshared no-makedepend --prefix=${CMAKE_BINARY_DIR})
if (OPENSSL_CONFIG_DIR)
message("Using existing OpenSSL configuration directory: ${OPENSSL_CONFIG_DIR}")
set(OPENSSL_CONFIG_OPTIONS ${OPENSSL_CONFIG_OPTIONS} --openssldir=${OPENSSL_CONFIG_DIR})
endif ()

if (WithOpenSSLASM)
enable_language(ASM)
if (MSVC)
Expand Down Expand Up @@ -45,8 +56,8 @@ else (WithSharedOpenSSL)
include(FetchContent)

FetchContent_Declare(openssl
URL https://github.com/openssl/openssl/releases/download/openssl-3.0.14/openssl-3.0.14.tar.gz
URL_HASH SHA256=eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca
URL https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz
URL_HASH SHA256=e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf
)

FetchContent_MakeAvailable(openssl)
Expand Down Expand Up @@ -101,6 +112,10 @@ else (WithSharedOpenSSL)
set(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include)
set(OPENSSL_LIBRARIES openssl_ssl openssl_crypto)

if (WIN32)
set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} crypt32)
endif ()

message("OPENSSL_INCLUDE_DIR: ${OPENSSL_INCLUDE_DIR}")
message("OPENSSL_LIBRARIES: ${OPENSSL_LIBRARIES}")
endif (WithSharedOpenSSL)

0 comments on commit 12c8642

Please sign in to comment.