MXS-2486: Fix listener serialization

The serialization should be done via the parameters. This also makes
SSLContext::serialize redundant.
This commit is contained in:
Markus Mäkelä
2019-05-27 20:21:24 +03:00
parent 075ed00f58
commit cab35b2dea
3 changed files with 2 additions and 42 deletions

View File

@ -234,29 +234,6 @@ SSLContext::SSLContext(const SSLConfig& cfg)
{
}
std::string SSLContext::serialize() const
{
std::ostringstream ss;
ss << "ssl=required\n";
if (!m_cfg.cert.empty())
{
ss << "ssl_cert=" << m_cfg.cert << "\n";
}
if (!m_cfg.key.empty())
{
ss << "ssl_key=" << m_cfg.key << "\n";
}
mxb_assert(!m_cfg.ca.empty());
ss << "ssl_ca_cert=" << m_cfg.ca << "\n";
ss << "ssl_version=" << ssl_method_type_to_string(m_cfg.version) << "\n";
ss << "ssl_cert_verify_depth=" << m_cfg.verify_depth << "\n";
ss << "ssl_verify_peer_certificate=" << (m_cfg.verify_peer ? "true" : "false") << "\n";
return ss.str();
}
bool SSLContext::init()
{
bool rval = true;