Bugfix: the curl option CURLOPT_SSL_VERIFYHOST is problematic
This commit is contained in:
parent
ed675b94d1
commit
da8a48f89e
3 changed files with 11 additions and 4 deletions
|
|
@ -118,7 +118,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
|
||||
$check_cert = get_config('system','verifyssl');
|
||||
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
|
||||
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (($check_cert) ? 2 : false));
|
||||
if ($check_cert) {
|
||||
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
}
|
||||
|
||||
$prx = get_config('system','proxy');
|
||||
if(strlen($prx)) {
|
||||
|
|
@ -265,7 +267,9 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0)
|
|||
|
||||
$check_cert = get_config('system','verifyssl');
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (($check_cert) ? 2 : false));
|
||||
if ($check_cert) {
|
||||
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
}
|
||||
$prx = get_config('system','proxy');
|
||||
if(strlen($prx)) {
|
||||
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue