Cleanup and added integrated tls config params parsing
This commit is contained in:
parent
16fff2fd51
commit
be293d72cd
16 changed files with 72 additions and 40 deletions
|
@ -262,13 +262,13 @@ std::shared_ptr<httplib::Response> CCClient::performRequest(const std::string& r
|
|||
{
|
||||
std::shared_ptr<httplib::Client> cli;
|
||||
|
||||
# ifndef XMRIG_NO_SSL_TLS
|
||||
# ifndef XMRIG_NO_TLS
|
||||
if (m_self->m_options->ccUseTls()) {
|
||||
cli = std::make_shared<httplib::SSLClient>(m_self->m_options->ccHost(), m_self->m_options->ccPort());
|
||||
} else {
|
||||
# endif
|
||||
cli = std::make_shared<httplib::Client>(m_self->m_options->ccHost(), m_self->m_options->ccPort());
|
||||
# ifndef XMRIG_NO_SSL_TLS
|
||||
# ifndef XMRIG_NO_TLS
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ bool Httpd::start()
|
|||
return false;
|
||||
}
|
||||
|
||||
# ifndef XMRIG_NO_SSL_TLS
|
||||
# ifndef XMRIG_NO_TLS
|
||||
if (m_options->ccUseTls()) {
|
||||
|
||||
m_keyPem = readFile(m_options->ccKeyFile());
|
||||
|
@ -67,7 +67,7 @@ bool Httpd::start()
|
|||
m_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, static_cast<uint16_t>(m_options->ccPort()), nullptr,
|
||||
nullptr, &Httpd::handler,
|
||||
this, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 10, MHD_OPTION_END);
|
||||
# ifndef XMRIG_NO_SSL_TLS
|
||||
# ifndef XMRIG_NO_TLS
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue