From 472a93c83ae8c440e62e5b72121f489cf5ffca81 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 14 Dec 2017 09:12:58 +0000 Subject: [PATCH 1/2] download: SSL suport --- src/common/download.cpp | 5 +++-- 1 file 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 lock(control->mutex); From a1d44f2746955abbf170f407f6613e3bddae3225 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 14 Dec 2017 13:33:06 +0000 Subject: [PATCH 2/2] updates: use https for updates --- src/common/updates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/updates.cpp b/src/common/updates.cpp index 141330c2c..faad56367 100644 --- a/src/common/updates.cpp +++ b/src/common/updates.cpp @@ -98,7 +98,7 @@ namespace tools std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version, bool user) { - const char *base = user ? "https://downloads.getmonero.org/" : "http://updates.getmonero.org/"; + const char *base = user ? "https://downloads.getmonero.org/" : "https://updates.getmonero.org/"; #ifdef _WIN32 static const char *extension = strncmp(buildtag.c_str(), "install-", 8) ? ".zip" : ".exe"; #else