summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/yassl/include/openssl/ssl.h10
-rw-r--r--extra/yassl/src/ssl.cpp2
-rw-r--r--include/violite.h3
-rwxr-xr-xmysql-test/mysql-test-run.pl1
4 files changed, 13 insertions, 3 deletions
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index def7803b725..c7cd103841c 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -189,11 +189,17 @@ enum { /* ERR Constants */
ERR_TXT_STRING = 1,
EVP_R_BAD_DECRYPT = 2
};
-
+/*
+ Allow type used by SSL_set_fd to be changed, default to int
+ in order to be compatible with OpenSSL
+ */
+#ifndef YASSL_SOCKET_T_DEFINED
+typedef int YASSL_SOCKET_T;
+#endif
SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
-int SSL_set_fd (SSL*, int);
+int SSL_set_fd (SSL*, YASSL_SOCKET_T);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index 860c05a1d25..cbd84efcdba 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -233,7 +233,7 @@ void SSL_free(SSL* ssl)
}
-int SSL_set_fd(SSL* ssl, int fd)
+int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd)
{
ssl->useSocket().set_fd(fd);
return SSL_SUCCESS;
diff --git a/include/violite.h b/include/violite.h
index 2647342ed65..04365213ec0 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -102,6 +102,9 @@ void vio_timeout(Vio *vio,uint which, uint timeout);
#define HEADER_DES_LOCL_H dummy_something
#define YASSL_MYSQL_COMPATIBLE
#define YASSL_PREFIX
+/* Set yaSSL to use same type as MySQL do for socket handles */
+typedef my_socket YASSL_SOCKET_T;
+#define YASSL_SOCKET_T_DEFINED
#include <openssl/ssl.h>
#include <openssl/err.h>
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 2a6744caa4a..a98d94ae9eb 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1520,6 +1520,7 @@ sub executable_setup () {
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
+ $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
if (!$opt_extern)
{