Commit 28f4f6da authored by Franco Fichtner's avatar Franco Fichtner

aliases: tweak curl verify

(cherry picked from commit fe2abc94)
parent 98ea43d0
......@@ -413,7 +413,11 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_ssl);
if (!$verify_ssl) {
/* leave the curl defaults untouched when verify is used */
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment