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
Fix misc.warnings.
SSL_LIBRARIES should be set to secur32 with SCHANNEL. malloc/free declarations were not found in sspi_client, so compiler assumed malloc() returns an int.
This commit is contained in:
@@ -264,6 +264,7 @@ IF(NOT WITH_SSL STREQUAL "OFF")
|
||||
ADD_DEFINITIONS(-DHAVE_SCHANNEL -DHAVE_TLS)
|
||||
SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/schannel.c" "${CC_SOURCE_DIR}/libmariadb/secure/ma_schannel.c")
|
||||
INCLUDE_DIRECTORIES("${CC_SOURCE_DIR}/plugins/pvio/")
|
||||
SET(SSL_LIBRARIES secur32)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <SecExt.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <mysql/plugin_auth.h>
|
||||
#include <mysql.h>
|
||||
|
@@ -22,10 +22,6 @@
|
||||
|
||||
static int skip_ssl= 1;
|
||||
|
||||
#ifdef WIN32
|
||||
#define pthread_exit(A) _endthreadex(0)
|
||||
#endif
|
||||
|
||||
const char *ssluser= "ssluser";
|
||||
const char *sslpw= "sslpw";
|
||||
char sslhost[128];
|
||||
@@ -266,8 +262,7 @@ DWORD WINAPI ssl_thread(void *dummy)
|
||||
|
||||
if (!(mysql= mysql_init(NULL)))
|
||||
{
|
||||
mysql_thread_end();
|
||||
pthread_exit(NULL);
|
||||
goto end;
|
||||
}
|
||||
mysql_ssl_set(mysql, 0, 0, "@CMAKE_SOURCE_DIR@/unittest/libmariadb/certs/ca-cert.pem", 0, 0);
|
||||
|
||||
@@ -275,18 +270,20 @@ DWORD WINAPI ssl_thread(void *dummy)
|
||||
port, socketname, 0))
|
||||
{
|
||||
diag(">Error: %s", mysql_error(mysql));
|
||||
mysql_close(mysql);
|
||||
mysql_thread_end();
|
||||
pthread_exit(NULL);
|
||||
goto end;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&LOCK_test);
|
||||
mysql_query(mysql, "UPDATE ssltest SET a=a+1");
|
||||
pthread_mutex_unlock(&LOCK_test);
|
||||
|
||||
end:
|
||||
if(mysql)
|
||||
mysql_close(mysql);
|
||||
mysql_thread_end();
|
||||
pthread_exit(0);
|
||||
return;
|
||||
#ifdef _WIN32
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int test_ssl_threads(MYSQL *mysql)
|
||||
@@ -775,7 +772,7 @@ static int test_ssl_fp_list(MYSQL *unused __attribute__((unused)))
|
||||
static int test_ssl_version(MYSQL *unused __attribute__((unused)))
|
||||
{
|
||||
unsigned int iversion;
|
||||
const char *version, *library;
|
||||
char *version, *library;
|
||||
MYSQL *my;
|
||||
|
||||
if (check_skip_ssl())
|
||||
|
Reference in New Issue
Block a user