MXS-2483: Take SSLProvider into use

Servers and listeners now have a SSLProvider member variable that is used
for all SSL related tasks.
This commit is contained in:
Markus Mäkelä
2019-05-21 11:29:26 +03:00
parent cb72b2a5cc
commit 3af66f3309
14 changed files with 44 additions and 53 deletions

View File

@ -1477,7 +1477,7 @@ static void diagnostics(MXS_ROUTER* router, DCB* dcb)
}
/* SSL options */
if (auto ssl = router_inst->service->dbref->server->ssl_context())
if (auto ssl = router_inst->service->dbref->server->ssl().context())
{
dcb_printf(dcb, "%s", ssl->to_string().c_str());
}
@ -1954,7 +1954,7 @@ static json_t* diagnostics_json(const MXS_ROUTER* router)
min5 /= 5.0;
/* SSL options */
if (auto ssl = router_inst->service->dbref->server->ssl_context())
if (auto ssl = router_inst->service->dbref->server->ssl().context())
{
json_object_set_new(rval, "master_ssl", ssl->to_json());
}

View File

@ -4850,7 +4850,7 @@ static void blr_master_get_config(ROUTER_INSTANCE* router, MasterServerConfig* c
curr_master->password = router->password;
curr_master->filestem = router->fileroot;
/* SSL options */
auto server_ssl = router->service->dbref->server->ssl_config();
auto server_ssl = router->service->dbref->server->ssl().config();
if (!server_ssl.empty())
{
@ -6354,7 +6354,7 @@ static int blr_set_master_ssl(ROUTER_INSTANCE* router,
if (ssl)
{
updated = 1;
router->service->dbref->server->set_ssl_context(std::move(ssl));
router->service->dbref->server->ssl().set_context(std::move(ssl));
/* Update options in router fields */
if (!config.ssl_key.empty())