Fix monerod --rpc-ssl disabled

This commit is contained in:
Lee Clagett 2021-03-21 16:27:16 -04:00
parent 5b8d714a4b
commit 2a20434705

View file

@ -335,7 +335,7 @@ namespace cryptonote
if (m_rpc_payment) if (m_rpc_payment)
m_net_server.add_idle_handler([this](){ return m_rpc_payment->on_idle(); }, 60 * 1000); m_net_server.add_idle_handler([this](){ return m_rpc_payment->on_idle(); }, 60 * 1000);
bool store_ssl_key = !restricted && rpc_config->ssl_options.auth.certificate_path.empty(); bool store_ssl_key = !restricted && rpc_config->ssl_options && rpc_config->ssl_options.auth.certificate_path.empty();
const auto ssl_base_path = (boost::filesystem::path{data_dir} / "rpc_ssl").string(); const auto ssl_base_path = (boost::filesystem::path{data_dir} / "rpc_ssl").string();
if (store_ssl_key && boost::filesystem::exists(ssl_base_path + ".crt")) if (store_ssl_key && boost::filesystem::exists(ssl_base_path + ".crt"))
{ {