1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Windows build fixes for OpenSSL

This commit is contained in:
Georg Richter
2019-07-16 08:52:24 +02:00
parent dc0f66f006
commit 77d051e89d
5 changed files with 13 additions and 1 deletions

View File

@@ -279,7 +279,7 @@ IF(WITH_SSL STREQUAL "ON")
IF(WIN32)
SET(WITH_SSL "SCHANNEL")
ELSE()
SET(WITH_SSL "OPENSSL")
SET(WITH_SSL "PENSSL")
ENDIF()
ENDIF()
@@ -292,8 +292,12 @@ IF(NOT WITH_SSL STREQUAL "OFF")
ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS)
SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c")
SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
IF(WIN32)
CHECK_INCLUDE_FILES (${OPENSSL_INCLUDE_DIR}/openssl/applink.c HAVE_OPENSSL_APPLINK_C)
ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${OPENSSL_INCLUDE_DIR})
TRY_RUN(LIBRESSL_RESULT HAVE_LIBRESSL
${CMAKE_BINARY_DIR}
${CC_SOURCE_DIR}/cmake/libressl_version.c

View File

@@ -2,6 +2,7 @@
/*
* Include file constants (processed in LibmysqlIncludeFiles.txt 1
*/
#cmakedefine HAVE_OPENSSL_APPLINK_C 1
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_BIGENDIAN 1
#cmakedefine HAVE_SETLOCALE 1

View File

@@ -30,6 +30,10 @@
#include <openssl/conf.h>
#include <openssl/md4.h>
#if defined(_WIN32) && !defined(_OPENSSL_Applink) && defined(HAVE_OPENSSL_APPLINK_C)
#include <openssl/applink.c>
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
#include <openssl/x509v3.h>
#define HAVE_OPENSSL_CHECK_HOST 1

View File

@@ -16,6 +16,7 @@
or write to the Free Software Foundation, Inc.,
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
*/
#include <ma_global.h>
#include <ma_crypt.h>
#include <openssl/evp.h>

View File

@@ -34,6 +34,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef WIN32
#include <pthread.h>
#else
#include <io.h>
#endif
#ifndef OK