MXS-2486: Move to_string into SSLProvider
The functionality is more a part of the provider than the context so it should be defined in it. It also doesn't use any parts of the SSLContext which makes it somewhat more clear that it doesn't belong there.
This commit is contained in:
@ -1477,9 +1477,11 @@ static void diagnostics(MXS_ROUTER* router, DCB* dcb)
|
||||
}
|
||||
|
||||
/* SSL options */
|
||||
if (auto ssl = router_inst->service->dbref->server->ssl().context())
|
||||
const auto& ssl = router_inst->service->dbref->server->ssl();
|
||||
|
||||
if (ssl.enabled())
|
||||
{
|
||||
dcb_printf(dcb, "%s", ssl->to_string().c_str());
|
||||
dcb_printf(dcb, "%s", ssl.to_string().c_str());
|
||||
}
|
||||
|
||||
/* Binlog Encryption options */
|
||||
@ -1953,12 +1955,6 @@ static json_t* diagnostics_json(const MXS_ROUTER* router)
|
||||
min10 /= 10.0;
|
||||
min5 /= 5.0;
|
||||
|
||||
/* SSL options */
|
||||
if (auto ssl = router_inst->service->dbref->server->ssl().context())
|
||||
{
|
||||
json_object_set_new(rval, "master_ssl", ssl->to_json());
|
||||
}
|
||||
|
||||
/* Binlog Encryption options */
|
||||
if (router_inst->encryption.enabled)
|
||||
{
|
||||
|
Reference in New Issue
Block a user