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)
|
||||
SET(WITH_SSL "SCHANNEL")
|
||||
ELSE()
|
||||
SET(WITH_SSL "OPENSSL")
|
||||
SET(WITH_SSL "PENSSL")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -293,8 +293,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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -78,7 +78,7 @@ int main(int argc, char **argv)
|
||||
while(1)
|
||||
{
|
||||
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) {
|
||||
case 'a':
|
||||
|
@@ -394,7 +394,9 @@ static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
|
||||
}
|
||||
|
||||
/* 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;
|
||||
*buf= mysql->net.read_pos;
|
||||
|
||||
@@ -591,7 +593,8 @@ retry:
|
||||
mysql->net.read_pos[0]= 0;
|
||||
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,
|
||||
|
@@ -35,6 +35,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
|
||||
|
Reference in New Issue
Block a user