Fixes CURLE_SSL_CACERT (60) when downloading tzdata2017c.tar.gz

This commit is contained in:
Peter Karlovsek 2017-12-01 17:53:24 +01:00 committed by Howard Hinnant
parent d3b8d4af8d
commit 5653e9e3a9

View File

@ -2786,6 +2786,7 @@ download_to_string(const std::string& url, std::string& str)
};
curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &str);
curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false);
auto res = curl_easy_perform(curl.get());
return (res == CURLE_OK);
}
@ -2804,6 +2805,7 @@ download_to_file(const std::string& url, const std::string& local_filename,
if (!curl)
return false;
curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false);
curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb,
void* userp) -> std::size_t
{