Unverified Commit f02bcf72 by Edward Thomson Committed by GitHub

Merge pull request #6464 from libgit2/ethomson/openssl3

Support OpenSSL3: add OpenSSL deprection warning compatibility flag
parents c438d0bb 655158fa
......@@ -20,11 +20,13 @@ if(USE_HTTPS STREQUAL "SecureTransport")
set_source_files_properties("crypt_commoncrypto.c" COMPILE_FLAGS "-Wno-deprecated")
elseif(USE_HTTPS STREQUAL "OpenSSL")
add_definitions(-DCRYPT_OPENSSL)
add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
include_directories(${OPENSSL_INCLUDE_DIR})
set(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c" "crypt_openssl.h")
elseif(USE_HTTPS STREQUAL "OpenSSL-Dynamic")
add_definitions(-DCRYPT_OPENSSL)
add_definitions(-DCRYPT_OPENSSL_DYNAMIC)
add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
set(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c" "crypt_openssl.h")
elseif(USE_HTTPS STREQUAL "mbedTLS")
add_definitions(-DCRYPT_MBEDTLS)
......
......@@ -38,6 +38,7 @@ if(USE_SHA1 STREQUAL "CollisionDetection")
target_compile_definitions(util PRIVATE SHA1DC_CUSTOM_INCLUDE_SHA1_C=\"git2_util.h\")
target_compile_definitions(util PRIVATE SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"git2_util.h\")
elseif(USE_SHA1 STREQUAL "OpenSSL" OR USE_SHA1 STREQUAL "OpenSSL-Dynamic")
add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
file(GLOB UTIL_SRC_SHA1 hash/openssl.*)
elseif(USE_SHA1 STREQUAL "CommonCrypto")
file(GLOB UTIL_SRC_SHA1 hash/common_crypto.*)
......@@ -54,6 +55,7 @@ list(SORT UTIL_SRC_SHA1)
if(USE_SHA256 STREQUAL "Builtin")
file(GLOB UTIL_SRC_SHA256 hash/builtin.* hash/rfc6234/*)
elseif(USE_SHA256 STREQUAL "OpenSSL" OR USE_SHA256 STREQUAL "OpenSSL-Dynamic")
add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
file(GLOB UTIL_SRC_SHA256 hash/openssl.*)
elseif(USE_SHA256 STREQUAL "CommonCrypto")
file(GLOB UTIL_SRC_SHA256 hash/common_crypto.*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment