MXS-2483: Address review comments

This commit is contained in:
Markus Mäkelä
2019-05-20 13:22:15 +03:00
parent 08bb5d009d
commit 68ad51bc52
2 changed files with 4 additions and 3 deletions

View File

@ -2862,6 +2862,7 @@ bool config_create_ssl(const char* name,
mxs::SSLContext** dest) mxs::SSLContext** dest)
{ {
bool ok = true; bool ok = true;
*dest = nullptr;
// The enum values convert to bool // The enum values convert to bool
int value = params.get_enum(CN_SSL, ssl_values); int value = params.get_enum(CN_SSL, ssl_values);

View File

@ -238,7 +238,7 @@ SSLContext::SSLContext(const std::string& key, const std::string& cert, const st
std::string SSLContext::serialize() const std::string SSLContext::serialize() const
{ {
std::stringstream ss; std::ostringstream ss;
ss << "ssl=required\n"; ss << "ssl=required\n";
if (!m_cert.empty()) if (!m_cert.empty())
@ -267,7 +267,7 @@ bool SSLContext::init()
{ {
#ifndef OPENSSL_1_1 #ifndef OPENSSL_1_1
case SERVICE_TLS10: case SERVICE_TLS10:
method = (SSL_METHOD*)TLSv1_method(); m_method = (SSL_METHOD*)TLSv1_method();
break; break;
#endif #endif
@ -398,7 +398,7 @@ json_t* SSLContext::to_json() const
std::string SSLContext::to_string() const std::string SSLContext::to_string() const
{ {
std::stringstream ss; std::ostringstream ss;
ss << "\tSSL initialized: yes\n" ss << "\tSSL initialized: yes\n"
<< "\tSSL method type: " << ssl_method_type_to_string(m_version) << "\n" << "\tSSL method type: " << ssl_method_type_to_string(m_version) << "\n"