From 57d38bfb8b700abee0eeef2bfe29541679a945dd Mon Sep 17 00:00:00 2001 From: alk <45172705+altalk23@users.noreply.github.com> Date: Mon, 28 Nov 2022 21:46:18 +0300 Subject: [PATCH] set CURLOPT_SSL_VERIFYHOST to 0 in fetch --- loader/src/utils/fetch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loader/src/utils/fetch.cpp b/loader/src/utils/fetch.cpp index 68eab41b..aa8ec5e1 100644 --- a/loader/src/utils/fetch.cpp +++ b/loader/src/utils/fetch.cpp @@ -44,6 +44,7 @@ Result<> web::fetchFile( curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &file); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, utils::fetch::writeBinaryData); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); @@ -77,6 +78,7 @@ Result web::fetchBytes(std::string const& url) { byte_array ret; curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ret); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, utils::fetch::writeBytes); curl_easy_setopt(curl, CURLOPT_USERAGENT, "github_api/1.0"); @@ -104,6 +106,7 @@ Result web::fetch(std::string const& url) { std::string ret; curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ret); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, utils::fetch::writeString); curl_easy_setopt(curl, CURLOPT_USERAGENT, "github_api/1.0"); @@ -174,6 +177,7 @@ SentAsyncWebRequest::SentAsyncWebRequest(AsyncWebRequest const& req, std::string } curl_easy_setopt(curl, CURLOPT_URL, m_url.c_str()); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_USERAGENT, "github_api/1.0"); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);