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:
@ -117,12 +117,6 @@ public:
|
||||
return m_cfg;
|
||||
}
|
||||
|
||||
// Convert to JSON representation
|
||||
json_t* to_json() const;
|
||||
|
||||
// Convert to human readable string representation
|
||||
std::string to_string() const;
|
||||
|
||||
~SSLContext();
|
||||
|
||||
private:
|
||||
@ -144,12 +138,21 @@ public:
|
||||
|
||||
SSLProvider(std::unique_ptr<mxs::SSLContext> context);
|
||||
|
||||
// Return true if SSL is enabled
|
||||
bool enabled() const
|
||||
{
|
||||
return m_context.get();
|
||||
}
|
||||
|
||||
// Current configuration
|
||||
const mxs::SSLConfig& config() const;
|
||||
|
||||
// The context or nullptr if no context is set
|
||||
mxs::SSLContext* context() const;
|
||||
|
||||
// Convert to human readable string representation
|
||||
std::string to_string() const;
|
||||
|
||||
// Set the context, argument must not be null
|
||||
void set_context(std::unique_ptr<mxs::SSLContext> ssl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user