Added service SSL mode variables.

This commit is contained in:
Markus Makela
2015-05-28 11:56:14 +03:00
parent 4365a04d2c
commit 16d6bd6d2c
5 changed files with 45 additions and 5 deletions

View File

@ -136,7 +136,8 @@ SERVICE *service;
service->routerModule = strdup(router);
service->users_from_all = false;
service->resources = NULL;
service->ssl_mode = SSL_REQUIRED;
if (service->name == NULL || service->routerModule == NULL)
{
if (service->name)
@ -855,6 +856,16 @@ serviceOptimizeWildcard(SERVICE *service, int action)
return 1;
}
/** Enable or disable the service SSL capability*/
int
serviceSetSSL(SERVICE *service, int action)
{
if(action)
service->ssl_mode = SSL_REQUIRED;
else
service->ssl_mode = SSL_DISABLED;
}
/**
* Whether to strip escape characters from the name of the database the client
* is connecting to.