aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-12-25 21:18:29 +0200
committerRiccardo Spagni <ric@spagni.net>2017-12-25 21:18:29 +0200
commit32c14e0f37bc1993c9336a11c5add709d8930562 (patch)
treed44163c088f89b0714aadc1080546eb7ce2e0aa3
parentMerge pull request #2920 (diff)
parentupdates: use https for updates (diff)
downloadmonero-32c14e0f37bc1993c9336a11c5add709d8930562.tar.xz
Merge pull request #2922
a1d44f27 updates: use https for updates (moneromooo-monero) 472a93c8 download: SSL suport (moneromooo-monero)
-rw-r--r--src/common/download.cpp5
-rw-r--r--src/common/updates.cpp2
2 files changed, 4 insertions, 3 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);
diff --git a/src/common/updates.cpp b/src/common/updates.cpp
index eff6754af..2d9c2d89c 100644
--- a/src/common/updates.cpp
+++ b/src/common/updates.cpp
@@ -99,7 +99,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