summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-05-27 11:08:51 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-05-27 11:08:51 +0300
commitc0cd662b986c378d536cff511ba7ba342fcd7012 (patch)
tree3e847036333ae9fe7a4e0a127e7c303376334cf8 /cmake
parentff10e0f6461f875967728228f71c8909eeaf41c4 (diff)
parente32212c63c9675591e9c4b15c1bce9f61ec02eb8 (diff)
downloadmariadb-git-c0cd662b986c378d536cff511ba7ba342fcd7012.tar.gz
Merge 10.4 to 10.5
Diffstat (limited to 'cmake')
-rw-r--r--cmake/libutils.cmake2
-rw-r--r--cmake/mariadb_connector_c.cmake2
-rw-r--r--cmake/ssl.cmake36
3 files changed, 16 insertions, 24 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 002d5a4cabc..6b2a2e9b2bb 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -317,7 +317,7 @@ ELSEIF(UNIX)
ENDIF()
ENDIF()
-# We try to hide the symbols in yassl/zlib to avoid name clashes with
+# We try to hide the symbols in bundled libraries to avoid name clashes with
# other libraries like openssl.
FUNCTION(RESTRICT_SYMBOL_EXPORTS target)
IF(VISIBILITY_HIDDEN_FLAG)
diff --git a/cmake/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake
index 0f08c3464c4..4fb4be44831 100644
--- a/cmake/mariadb_connector_c.cmake
+++ b/cmake/mariadb_connector_c.cmake
@@ -8,7 +8,7 @@ SET(CONC_WITH_SIGNCODE ${SIGNCODE})
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
SET(CONC_WITH_EXTERNAL_ZLIB ON)
-IF(SSL_DEFINES MATCHES "YASSL")
+IF(SSL_DEFINES MATCHES "WOLFSSL")
IF(WIN32)
SET(CONC_WITH_SSL "SCHANNEL")
ELSE()
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 2ec370404df..7a571171eaf 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
# We support different versions of SSL:
-# - "bundled" uses source code in <source dir>/extra/yassl
+# - "bundled" uses source code in <source dir>/extra/wolfssl
# - "system" (typically) uses headers/libraries in /usr/lib and /usr/lib64
# - a custom installation of openssl can be used like this
# - cmake -DCMAKE_PREFIX_PATH=</path/to/custom/openssl> -DWITH_SSL="system"
@@ -35,7 +35,7 @@
# 'set path=</path/to/custom/openssl>\bin;%PATH%
# in order to find the .dll files at runtime.
-SET(WITH_SSL_DOC "bundled (use yassl)")
+SET(WITH_SSL_DOC "bundled (use wolfssl)")
SET(WITH_SSL_DOC
"${WITH_SSL_DOC}, yes (prefer os library if present, otherwise use bundled)")
SET(WITH_SSL_DOC
@@ -48,29 +48,19 @@ MACRO (CHANGE_SSL_SETTINGS string)
ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_SSL)
- SET(INC_DIRS
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
+ SET(INC_DIRS
+ ${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl
+ ${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl/wolfssl
)
- SET(SSL_LIBRARIES yassl taocrypt)
+ SET(SSL_LIBRARIES wolfssl wolfcrypt)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
- SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
- SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
- SET(HAVE_ERR_remove_thread_state OFF CACHE INTERNAL "yassl doesn't have ERR_remove_thread_state")
- SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "yassl doesn't support AES-CTR")
- SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "yassl doesn't support AES-GCM")
+ SET(SSL_DEFINES "-DHAVE_OPENSSL -DHAVE_WOLFSSL -DOPENSSL_ALL -DWOLFSSL_MYSQL_COMPATIBLE -DWC_NO_HARDEN")
+ SET(HAVE_ERR_remove_thread_state ON CACHE INTERNAL "wolfssl doesn't have ERR_remove_thread_state")
+ SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "wolfssl does support AES-CTR, but differently from openssl")
+ SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "wolfssl does not support AES-GCM")
+ SET(HAVE_X509_check_host ON CACHE INTERNAL "wolfssl does support X509_check_host")
CHANGE_SSL_SETTINGS("bundled")
- ADD_SUBDIRECTORY(extra/yassl)
- ADD_SUBDIRECTORY(extra/yassl/taocrypt)
- GET_TARGET_PROPERTY(src yassl SOURCES)
- FOREACH(file ${src})
- SET(SSL_SOURCES ${SSL_SOURCES} ${CMAKE_SOURCE_DIR}/extra/yassl/${file})
- ENDFOREACH()
- GET_TARGET_PROPERTY(src taocrypt SOURCES)
- FOREACH(file ${src})
- SET(SSL_SOURCES ${SSL_SOURCES}
- ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/${file})
- ENDFOREACH()
+ ADD_SUBDIRECTORY(extra/wolfssl)
MESSAGE_ONCE(SSL_LIBRARIES "SSL_LIBRARIES = ${SSL_LIBRARIES}")
ENDMACRO()
@@ -155,6 +145,8 @@ MACRO (MYSQL_CHECK_SSL)
HAVE_EncryptAes128Ctr)
CHECK_SYMBOL_EXISTS(EVP_aes_128_gcm "openssl/evp.h"
HAVE_EncryptAes128Gcm)
+ CHECK_SYMBOL_EXISTS(X509_check_host "openssl/x509v3.h"
+ HAVE_X509_check_host)
SET(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_REQUIRED_LIBRARIES)
ELSE()