MXS-2483: Make server SSL private
The old server_ssl member is now renamed and private. The ssl_context and set_ssl_context methods provide access to it.
This commit is contained in:
@ -1477,9 +1477,9 @@ static void diagnostics(MXS_ROUTER* router, DCB* dcb)
|
||||
}
|
||||
|
||||
/* SSL options */
|
||||
if (router_inst->ssl_enabled)
|
||||
if (auto ssl = router_inst->service->dbref->server->ssl_context())
|
||||
{
|
||||
dcb_printf(dcb, "%s", router_inst->service->dbref->server->server_ssl->to_string().c_str());
|
||||
dcb_printf(dcb, "%s", ssl->to_string().c_str());
|
||||
}
|
||||
|
||||
/* Binlog Encryption options */
|
||||
@ -1954,9 +1954,9 @@ static json_t* diagnostics_json(const MXS_ROUTER* router)
|
||||
min5 /= 5.0;
|
||||
|
||||
/* SSL options */
|
||||
if (router_inst->ssl_enabled)
|
||||
if (auto ssl = router_inst->service->dbref->server->ssl_context())
|
||||
{
|
||||
json_object_set_new(rval, "master_ssl", router_inst->service->dbref->server->server_ssl->to_json());
|
||||
json_object_set_new(rval, "master_ssl", ssl->to_json());
|
||||
}
|
||||
|
||||
/* Binlog Encryption options */
|
||||
|
@ -4850,9 +4850,8 @@ static void blr_master_get_config(ROUTER_INSTANCE* router, MasterServerConfig* c
|
||||
curr_master->password = router->password;
|
||||
curr_master->filestem = router->fileroot;
|
||||
/* SSL options */
|
||||
if (router->service->dbref->server->server_ssl)
|
||||
if (auto server_ssl = router->service->dbref->server->ssl_context())
|
||||
{
|
||||
auto server_ssl = router->service->dbref->server->server_ssl;
|
||||
curr_master->ssl_enabled = router->ssl_enabled;
|
||||
if (router->ssl_version)
|
||||
{
|
||||
@ -6353,8 +6352,7 @@ static int blr_set_master_ssl(ROUTER_INSTANCE* router,
|
||||
if (ssl)
|
||||
{
|
||||
updated = 1;
|
||||
delete router->service->dbref->server->server_ssl;
|
||||
router->service->dbref->server->server_ssl = ssl;
|
||||
router->service->dbref->server->set_ssl_context(ssl);
|
||||
|
||||
/* Update options in router fields */
|
||||
if (!config.ssl_key.empty())
|
||||
|
Reference in New Issue
Block a user