comparison Framework/MySQL/MySQLParameters.h @ 163:4d32c9c8d6c0

Added support for TLS connections
author Alain Mazy <alain@mazy.be>
date Mon, 13 Jul 2020 11:59:29 +0200
parents 063aa53b5917
children 6fe74f9a516e
comparison
equal deleted inserted replaced
162:fc13b4e8f888 163:4d32c9c8d6c0
36 std::string username_; 36 std::string username_;
37 std::string password_; 37 std::string password_;
38 std::string database_; 38 std::string database_;
39 uint16_t port_; 39 uint16_t port_;
40 std::string unixSocket_; 40 std::string unixSocket_;
41 bool ssl_;
42 bool verifySslServerCertificates_;
43 std::string sslCaCertificates_;
41 bool lock_; 44 bool lock_;
42 unsigned int maxConnectionRetries_; 45 unsigned int maxConnectionRetries_;
43 unsigned int connectionRetryInterval_; 46 unsigned int connectionRetryInterval_;
44 47
45 void Reset(); 48 void Reset();
46 49
47 public: 50 public:
48 MySQLParameters(); 51 MySQLParameters();
49 52
50 MySQLParameters(const OrthancPlugins::OrthancConfiguration& configuration); 53 MySQLParameters(const OrthancPlugins::OrthancConfiguration& pluginConfiguration, const OrthancPlugins::OrthancConfiguration& orthancConfiguration);
51 54
52 const std::string& GetHost() const 55 const std::string& GetHost() const
53 { 56 {
54 return host_; 57 return host_;
55 } 58 }
75 } 78 }
76 79
77 uint16_t GetPort() const 80 uint16_t GetPort() const
78 { 81 {
79 return port_; 82 return port_;
83 }
84
85 bool IsSsl() const
86 {
87 return ssl_;
88 }
89
90 bool IsVerifyServerCertificates() const
91 {
92 return verifySslServerCertificates_;
93 }
94
95 const char* GetSslCaCertificates() const
96 {
97 return sslCaCertificates_.c_str();
80 } 98 }
81 99
82 void SetHost(const std::string& host); 100 void SetHost(const std::string& host);
83 101
84 void SetUsername(const std::string& username); 102 void SetUsername(const std::string& username);