Added OpenSSL init function call.
This commit is contained in:
@ -46,7 +46,9 @@
|
|||||||
#include <modinfo.h>
|
#include <modinfo.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <modutil.h>
|
#include <modutil.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
|
#include <openssl/ssl.h>
|
||||||
|
#include <openssl/err.h>
|
||||||
MODULE_INFO info = {
|
MODULE_INFO info = {
|
||||||
MODULE_API_PROTOCOL,
|
MODULE_API_PROTOCOL,
|
||||||
MODULE_GA,
|
MODULE_GA,
|
||||||
@ -113,6 +115,7 @@ version()
|
|||||||
void
|
void
|
||||||
ModuleInit()
|
ModuleInit()
|
||||||
{
|
{
|
||||||
|
SSL_library_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -473,7 +476,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
|
|||||||
return 1;
|
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.",
|
skygw_log_write(LT,"User %s@%s connected to service '%s' with SSL.",
|
||||||
protocol->owner_dcb->user,
|
protocol->owner_dcb->user,
|
||||||
@ -481,6 +484,11 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
|
|||||||
protocol->owner_dcb->service->name);
|
protocol->owner_dcb->service->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ssl && protocol->owner_dcb->service->ssl_mode != SSL_DISABLED)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
username = get_username_from_auth(username, client_auth_packet);
|
username = get_username_from_auth(username, client_auth_packet);
|
||||||
|
|
||||||
if (username == NULL)
|
if (username == NULL)
|
||||||
|
Reference in New Issue
Block a user