Added OpenSSL init function call.

This commit is contained in:
Markus Makela 2015-05-28 18:13:45 +03:00
parent 3d6259cb00
commit 449c186a66

View File

@ -46,7 +46,9 @@
#include <modinfo.h>
#include <sys/stat.h>
#include <modutil.h>
#include <openssl/crypto.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
MODULE_INFO info = {
MODULE_API_PROTOCOL,
MODULE_GA,
@ -113,6 +115,7 @@ version()
void
ModuleInit()
{
SSL_library_init();
}
/**
@ -473,7 +476,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
return 1;
}
if(LOG_IS_ENABLED(LT))
if(LOG_IS_ENABLED(LT) && ssl)
{
skygw_log_write(LT,"User %s@%s connected to service '%s' with SSL.",
protocol->owner_dcb->user,
@ -481,6 +484,11 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
protocol->owner_dcb->service->name);
}
if(ssl && protocol->owner_dcb->service->ssl_mode != SSL_DISABLED)
{
}
username = get_username_from_auth(username, client_auth_packet);
if (username == NULL)