Project

General

Profile

« Previous | Next » 

Revision 91957c42

Added by Chris Buechler over 10 years ago

verify certs by default here

View differences:

etc/inc/pfsense-utils.inc
1755 1755
	return $version[0];
1756 1756
}
1757 1757

  
1758
function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 60, $timeout = 0) {
1758
function download_file($url, $destination, $verify_ssl = true, $connect_timeout = 60, $timeout = 0) {
1759 1759
	global $config, $g;
1760 1760

  
1761 1761
	$fp = fopen($destination, "wb");
......
1809 1809
	curl_setopt($ch, CURLOPT_URL, $url_file);
1810 1810
	curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'read_header');
1811 1811
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
1812
	/* Don't verify SSL peers since we don't have the certificates to do so. */
1813
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
1814 1812
	curl_setopt($ch, CURLOPT_WRITEFUNCTION, $readbody);
1815 1813
	curl_setopt($ch, CURLOPT_NOPROGRESS, '1');
1816 1814
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);

Also available in: Unified diff