aboutsummaryrefslogtreecommitdiff
path: root/src/common/download.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-14 09:12:58 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-14 09:12:58 +0000
commit472a93c83ae8c440e62e5b72121f489cf5ffca81 (patch)
tree0edd4421ed82774396819cce377ddd037782fc28 /src/common/download.cpp
parentMerge pull request #2906 (diff)
downloadmonero-472a93c83ae8c440e62e5b72121f489cf5ffca81.tar.xz
download: SSL suport
Diffstat (limited to '')
-rw-r--r--src/common/download.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/download.cpp b/src/common/download.cpp
index 28aac5a59..d330479de 100644
--- a/src/common/download.cpp
+++ b/src/common/download.cpp
@@ -147,9 +147,10 @@ namespace tools
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);
- 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)))
{
boost::lock_guard<boost::mutex> lock(control->mutex);