summaryrefslogtreecommitdiff
path: root/cmake/ssl.cmake
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-01-28 10:36:12 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-01-28 10:36:12 +0100
commita3df9bcadc57be70bdadc8cf21290e4fe6c9b37a (patch)
tree630daf21227a6fcd6466f65d70f5809928e2c8b2 /cmake/ssl.cmake
parente6fcd7230954c6111bba63e7f7201fc81e50178e (diff)
parentad220b96fb01dbb6acf7e51bdd8d4d6362d96ea7 (diff)
downloadmariadb-git-a3df9bcadc57be70bdadc8cf21290e4fe6c9b37a.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'cmake/ssl.cmake')
-rw-r--r--cmake/ssl.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index c76e73927c0..6985932d165 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -174,15 +174,24 @@ MACRO (MYSQL_CHECK_SSL)
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)
INCLUDE(CheckSymbolExists)
+ INCLUDE(CheckCSourceCompiles)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
+ CHECK_C_SOURCE_COMPILES("
+ #include <openssl/dh.h>
+ int main()
+ {
+ DH dh;
+ return sizeof(dh.version);
+ }" OLD_OPENSSL_API)
+
SET(OPENSSL_FOUND TRUE)
ELSE()
SET(OPENSSL_FOUND FALSE)
ENDIF()
- IF(OPENSSL_FOUND AND OPENSSL_MAJOR_VERSION STRLESS "101" AND
+ IF(OPENSSL_FOUND AND OLD_OPENSSL_API AND
HAVE_SHA512_DIGEST_LENGTH)
MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")