diff --git a/.travis.yml b/.travis.yml index 13dedd41..170d0143 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,7 @@ jobs: os: windows language: shell - env: srv=mariadb v=10.3 local=1 + dist: bionic - env: srv=mariadb v=10.4 local=1 - env: srv=mariadb v=10.5 local=1 - env: srv=mariadb v=10.6 local=1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4918ef74..f3b6cbdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) INCLUDE(CheckFunctionExists) IF(COMMAND CMAKE_POLICY) - SET(NEW_POLICIES CMP0003 CMP0022 CMP0023 CMP0077 CMP0069 CMP0075) + SET(NEW_POLICIES CMP0003 CMP0022 CMP0023 CMP0057 CMP0077 CMP0069 CMP0075) FOREACH(TYPE OLD NEW) FOREACH(P ${${TYPE}_POLICIES}) IF(POLICY ${P}) diff --git a/libmariadb/secure/openssl.c b/libmariadb/secure/openssl.c index 683015c1..40fe7b1f 100644 --- a/libmariadb/secure/openssl.c +++ b/libmariadb/secure/openssl.c @@ -688,7 +688,7 @@ int ma_tls_verify_server_cert(MARIADB_TLS *ctls) return 1; } #ifdef HAVE_OPENSSL_CHECK_HOST - if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1 + if (X509_check_host(cert, mysql->host, strlen(mysql->host), 0, 0) != 1 && X509_check_ip_asc(cert, mysql->host, 0) != 1) goto error; #else diff --git a/plugins/auth/CMakeLists.txt b/plugins/auth/CMakeLists.txt index 60354647..6d399260 100644 --- a/plugins/auth/CMakeLists.txt +++ b/plugins/auth/CMakeLists.txt @@ -99,7 +99,10 @@ IF(NOT WIN32) INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake) IF(GSSAPI_FOUND) SET(GSSAPI_SOURCES ${AUTH_DIR}/auth_gssapi_client.c ${AUTH_DIR}/gssapi_client.c ${AUTH_DIR}/gssapi_errmsg.c) - CHECK_C_COMPILER_FLAG(-Wl,--as-needed have_C__Wl___as_needed) + IF (CMAKE_VERSION VERSION_GREATER 3.18) + INCLUDE(CheckLinkerFlag) + CHECK_LINKER_FLAG(C -Wl,--as-needed have__Wl___as_needed) + ENDIF() ENDIF() SET(AUTH_GSSAPI_DEFAULT_CONFIG DYNAMIC) ELSE() @@ -118,7 +121,7 @@ IF(GSSAPI_SOURCES) IF(CMAKE_C_COMPILER_ID MATCHES "Clang") SET_SOURCE_FILES_PROPERTIES(${GSSAPI_SOURCES} PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") ENDIF() - IF(have_C__Wl___as_needed) + IF(have__Wl___as_needed) SET_TARGET_PROPERTIES(auth_gssapi_client PROPERTIES LINK_FLAGS "-Wl,--as-needed") ENDIF() ENDIF()