diff options
author | Christian Schneider | 2016-05-10 17:00:38 +0200 |
---|---|---|
committer | Christian Schneider | 2016-05-10 17:00:38 +0200 |
commit | bcc7b2610d8f0b6bf012a2086b46896fdf5bf7bd (patch) | |
tree | 78232e5e1dd8c4da0582eb2dbccb55dfcded37eb /it_url.class | |
parent | 60341f25054255ed45a3530f004ad7a3c9352eab (diff) | |
download | itools-bcc7b2610d8f0b6bf012a2086b46896fdf5bf7bd.tar.gz itools-bcc7b2610d8f0b6bf012a2086b46896fdf5bf7bd.tar.bz2 itools-bcc7b2610d8f0b6bf012a2086b46896fdf5bf7bd.zip |
Added option allow_insecure_ssl to it_url::get() to disable SSL certificate verification for self-signed certificates
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index 1a8d171..b760e0d 100644 --- a/it_url.class +++ b/it_url.class @@ -294,8 +294,8 @@ static function curl_opts($p=array()) CURLOPT_HTTPHEADER => $headers, CURLOPT_CAPATH => '/etc/ssl/certs/', - CURLOPT_SSL_VERIFYPEER => true, - CURLOPT_SSL_VERIFYHOST => 2, + CURLOPT_SSL_VERIFYPEER => !$p['allow_insecure_ssl'], + CURLOPT_SSL_VERIFYHOST => $p['allow_insecure_ssl'] ? 0 : 2, CURLINFO_HEADER_OUT => 1, ); |