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

@ -420,7 +420,7 @@ hashtable_memory_fns(monitorhash,strdup,NULL,free,NULL);
/** Add the 5.5.5- string to the start of the version string if
* the version string starts with "10.".
* This mimics MariaDB 10.0 replication which adds 5.5.5- for backwards compatibility. */
* This mimics MariaDB 10.0 behavior which adds 5.5.5- for backwards compatibility. */
if(strncmp(version_string,"10.",3) == 0)
{
((SERVICE *)(obj->element))->version_string = malloc((strlen(version_string) +

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.