You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Merge commit '77d051e89d0b342333d951e66e53f2aea43f6e36' into 3.1
This commit is contained in:
@@ -280,7 +280,7 @@ IF(WITH_SSL STREQUAL "ON")
|
|||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(WITH_SSL "SCHANNEL")
|
SET(WITH_SSL "SCHANNEL")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(WITH_SSL "OPENSSL")
|
SET(WITH_SSL "PENSSL")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@@ -293,8 +293,12 @@ IF(NOT WITH_SSL STREQUAL "OFF")
|
|||||||
ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS)
|
ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS)
|
||||||
SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c")
|
SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c")
|
||||||
SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
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})
|
INCLUDE_DIRECTORIES(BEFORE ${OPENSSL_INCLUDE_DIR})
|
||||||
|
|
||||||
|
|
||||||
TRY_RUN(LIBRESSL_RESULT HAVE_LIBRESSL
|
TRY_RUN(LIBRESSL_RESULT HAVE_LIBRESSL
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CC_SOURCE_DIR}/cmake/libressl_version.c
|
${CC_SOURCE_DIR}/cmake/libressl_version.c
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* Include file constants (processed in LibmysqlIncludeFiles.txt 1
|
* Include file constants (processed in LibmysqlIncludeFiles.txt 1
|
||||||
*/
|
*/
|
||||||
|
#cmakedefine HAVE_OPENSSL_APPLINK_C 1
|
||||||
#cmakedefine HAVE_ALLOCA_H 1
|
#cmakedefine HAVE_ALLOCA_H 1
|
||||||
#cmakedefine HAVE_BIGENDIAN 1
|
#cmakedefine HAVE_BIGENDIAN 1
|
||||||
#cmakedefine HAVE_SETLOCALE 1
|
#cmakedefine HAVE_SETLOCALE 1
|
||||||
|
@@ -30,6 +30,10 @@
|
|||||||
#include <openssl/conf.h>
|
#include <openssl/conf.h>
|
||||||
#include <openssl/md4.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)
|
#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#define HAVE_OPENSSL_CHECK_HOST 1
|
#define HAVE_OPENSSL_CHECK_HOST 1
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
or write to the Free Software Foundation, Inc.,
|
or write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
|
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
|
||||||
*/
|
*/
|
||||||
|
#include <ma_global.h>
|
||||||
#include <ma_crypt.h>
|
#include <ma_crypt.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ int main(int argc, char **argv)
|
|||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
int option_index= 0;
|
int option_index= 0;
|
||||||
c= getopt_long(argc, argv, "abcdefghij", long_options, &option_index);
|
c= getopt_long(argc, argv, "abcdefghijkl", long_options, &option_index);
|
||||||
|
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
|
@@ -394,7 +394,9 @@ static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* otherwise read the data */
|
/* otherwise read the data */
|
||||||
pkt_len= ma_net_safe_read(mysql);
|
if ((pkt_len= ma_net_safe_read(mysql)) == packet_error)
|
||||||
|
return (int)packet_error;
|
||||||
|
|
||||||
mpvio->last_read_packet_len= pkt_len;
|
mpvio->last_read_packet_len= pkt_len;
|
||||||
*buf= mysql->net.read_pos;
|
*buf= mysql->net.read_pos;
|
||||||
|
|
||||||
@@ -591,7 +593,8 @@ retry:
|
|||||||
mysql->net.read_pos[0]= 0;
|
mysql->net.read_pos[0]= 0;
|
||||||
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
|
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
|
||||||
|
|
||||||
if (res > CR_OK && mysql->net.read_pos[0] != 254)
|
if ((res == CR_ERROR && !mysql->net.buff) ||
|
||||||
|
(res > CR_OK && mysql->net.read_pos[0] != 254))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
the plugin returned an error. write it down in mysql,
|
the plugin returned an error. write it down in mysql,
|
||||||
|
@@ -35,6 +35,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#else
|
||||||
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OK
|
#ifndef OK
|
||||||
|
Reference in New Issue
Block a user