summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-06-14 20:21:24 +0200
committerSergei Golubchik <serg@mariadb.org>2017-06-22 12:56:33 +0200
commitd937916c064d46076f5cec2280d91870ed7576d4 (patch)
treefcf63d51750792d8f7106a92d5b5a840c84bf026 /cmake
parentd4007f2e73e3ad2676c3f766b233e96f21874c7d (diff)
downloadmariadb-git-d937916c064d46076f5cec2280d91870ed7576d4.tar.gz
MDEV-12193 Discontinue support of unsecure and unsupported OpenSSL versions (< 1.0.1)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ssl.cmake23
1 files changed, 12 insertions, 11 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index b699a3b493f..74d61b582ea 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -167,31 +167,32 @@ MACRO (MYSQL_CHECK_SSL)
SET(CMAKE_REQUIRED_INCLUDES)
IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND
CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
- SET(SSL_SOURCES "")
- SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
- IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET})
- ENDIF()
- IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL})
- ENDIF()
-
# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
- REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)
+ MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
+ ENDIF()
+ IF(OPENSSL_MAJOR_VERSION GREATER 0)
+ SET(SSL_SOURCES "")
+ SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
+ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET})
+ ENDIF()
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL})
+ ENDIF()
MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
- MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
MESSAGE(STATUS "SSL_LIBRARIES = ${SSL_LIBRARIES}")
SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
SET(SSL_INTERNAL_INCLUDE_DIRS "")