aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-04 16:04:52 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-04 16:04:52 -0700
commit8424f31aad844b49e74e0fb7a7d197284fb67ec9 (patch)
treeb0711c1d0fd226d5e0061bc5b42cfbb774200431 /boot.php
parent8abac5e5c7128748f8bc8cc8c52ebf37874023c4 (diff)
downloadvolse-hubzilla-8424f31aad844b49e74e0fb7a7d197284fb67ec9.tar.gz
volse-hubzilla-8424f31aad844b49e74e0fb7a7d197284fb67ec9.tar.bz2
volse-hubzilla-8424f31aad844b49e74e0fb7a7d197284fb67ec9.zip
a bit more robust about loading external pics
also friend confirm was getting wrong email
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 5baaa218f..2e3480f40 100644
--- a/boot.php
+++ b/boot.php
@@ -298,6 +298,13 @@ function fetch_url($url,$binary = false) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch, CURLOPT_MAXREDIRS,8);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
+
+ // by default we will allow self-signed certs
+ // but you can override this
+
+ $check_cert = get_config('system','verifyssl');
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
+
$prx = get_config('system','proxy');
if(strlen($prx)) {
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
@@ -327,6 +334,8 @@ function post_url($url,$params) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
+ $check_cert = get_config('system','verifyssl');
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
$prx = get_config('system','proxy');
if(strlen($prx)) {
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);