Cleanup and added integrated tls config params parsing

This commit is contained in:
BenDroid 2018-02-25 23:32:51 +01:00
parent 16fff2fd51
commit be293d72cd
16 changed files with 72 additions and 40 deletions

View file

@ -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

View file

@ -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