summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/violite.h2
-rw-r--r--sql/encryption.cc3
-rw-r--r--vio/viosslfactories.c4
3 files changed, 7 insertions, 2 deletions
diff --git a/include/violite.h b/include/violite.h
index 34f59f2e598..9a0e995133d 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -171,6 +171,8 @@ struct st_VioSSLFd
int sslaccept(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
int sslconnect(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
+void vio_check_ssl_init();
+
struct st_VioSSLFd
*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
const char *ca_file, const char *ca_path,
diff --git a/sql/encryption.cc b/sql/encryption.cc
index fc07623883e..9c38713fdfa 100644
--- a/sql/encryption.cc
+++ b/sql/encryption.cc
@@ -18,6 +18,7 @@
#include "log.h"
#include "sql_plugin.h"
#include <my_crypt.h>
+#include <violite.h>
/* there can be only one encryption plugin enabled */
static plugin_ref encryption_manager= 0;
@@ -63,6 +64,8 @@ int initialize_encryption_plugin(st_plugin_int *plugin)
if (encryption_manager)
return 1;
+ vio_check_ssl_init();
+
if (plugin->plugin->init && plugin->plugin->init(plugin))
{
sql_print_error("Plugin '%s' init function returned error.",
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 4a31ebd1798..80d1e55f358 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -150,7 +150,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file,
}
-static void check_ssl_init()
+void vio_check_ssl_init()
{
if (!ssl_algorithms_added)
{
@@ -243,7 +243,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
crl_file ? crl_file : "NULL",
crl_path ? crl_path : "NULL"));
- check_ssl_init();
+ vio_check_ssl_init();
if (!(ssl_fd= ((struct st_VioSSLFd*)
my_malloc(sizeof(struct st_VioSSLFd),MYF(0)))))