mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
download: SSL suport
This commit is contained in:
parent
f51bac990e
commit
472a93c83a
@ -147,9 +147,10 @@ namespace tools
|
|||||||
|
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
uint16_t port = u_c.port ? u_c.port : 80;
|
bool ssl = u_c.schema == "https";
|
||||||
|
uint16_t port = u_c.port ? u_c.port : ssl ? 443 : 80;
|
||||||
MDEBUG("Connecting to " << u_c.host << ":" << port);
|
MDEBUG("Connecting to " << u_c.host << ":" << port);
|
||||||
client.set_server(u_c.host, std::to_string(port), boost::none);
|
client.set_server(u_c.host, std::to_string(port), boost::none, ssl);
|
||||||
if (!client.connect(std::chrono::seconds(30)))
|
if (!client.connect(std::chrono::seconds(30)))
|
||||||
{
|
{
|
||||||
boost::lock_guard<boost::mutex> lock(control->mutex);
|
boost::lock_guard<boost::mutex> lock(control->mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user