From bcc7b2610d8f0b6bf012a2086b46896fdf5bf7bd Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 10 May 2016 17:00:38 +0200 Subject: Added option allow_insecure_ssl to it_url::get() to disable SSL certificate verification for self-signed certificates --- it_url.class | 4 ++-- 1 file 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, ); -- cgit v1.2.3