summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-05-03 21:22:59 +0200
committerSergei Golubchik <serg@mariadb.org>2017-05-09 18:53:10 +0200
commitccca4f43c92916c347210a7f9a8126f2aa3f6c31 (patch)
tree28d08c49ae7f27c861cb6f8b8cf770ef0b32ae9c /sql/slave.cc
parentf8866f8f665ac26beb31842fef48ecee5feb346e (diff)
downloadmariadb-git-ccca4f43c92916c347210a7f9a8126f2aa3f6c31.tar.gz
MDEV-10332 support for OpenSSL 1.1 and LibreSSL
post-review fixes: * move all ssl implementation related ifdefs/defines to one file (ssl_compat.h) * work around OpenSSL-1.1 desire to malloc every EVP context by run-time checking that context allocated on the stack is big enough (openssl.c) * use newer version of the AWS SDK for OpenSSL 1.1 * use get_dh2048() function as generated by openssl 1.1 (viosslfactories.c)
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc19
1 files changed, 1 insertions, 18 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 611baf6c9bc..ec2d441e197 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -40,6 +40,7 @@
#include <my_dir.h>
#include <sql_common.h>
#include <errmsg.h>
+#include <ssl_compat.h>
#include <mysqld_error.h>
#include <mysys_err.h>
#include "rpl_handler.h"
@@ -60,12 +61,6 @@
#include "debug_sync.h"
#include "rpl_parallel.h"
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-#define ERR_remove_state(X)
-#elif defined(HAVE_ERR_remove_thread_state)
-#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
-#endif
-
#define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
#define MAX_SLAVE_RETRY_PAUSE 5
@@ -4677,13 +4672,7 @@ err_during_init:
DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
-#ifdef HAVE_OPENSSL
-#if OPENSSL_VERSION_NUMBER < 0x10000000L
ERR_remove_state(0);
-#elif OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_remove_thread_state(0);
-#endif
-#endif
pthread_exit(0);
return 0; // Avoid compiler warnings
}
@@ -5346,13 +5335,7 @@ err_during_init:
DBUG_LEAVE; // Must match DBUG_ENTER()
my_thread_end();
-#ifdef HAVE_OPENSSL
-#if OPENSSL_VERSION_NUMBER < 0x10000000L
ERR_remove_state(0);
-#elif OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_remove_thread_state(0);
-#endif
-#endif
pthread_exit(0);
return 0; // Avoid compiler warnings
}