Adding flags to ignore ssl verify for curl calls.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 25 Aug 2017 20:05:37 +0000 (16:05 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 25 Aug 2017 20:05:37 +0000 (16:05 -0400)
Toolkit/CKImages/imageFetch.php
Toolkit/FileServer/AdapterAbstract.php
Toolkit/FileServer/ImageAdapter.php
Toolkit/Photos/photoProxy.php
Toolkit/Videos/Video.php

index 0c41ae8..635bd89 100644 (file)
@@ -33,6 +33,7 @@ $fp = fopen(dirname(__FILE__) . "/editedImages/$fileToFetch", 'w+');
 $ch = curl_init(CKIMAGE_ORIGINAL . $fileToFetch);
 curl_setopt($ch, CURLOPT_TIMEOUT, 50);
 curl_setopt($ch, CURLOPT_FILE, $fp);
+curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
 curl_exec($ch);
 curl_close($ch);
index 956483f..6687c46 100644 (file)
@@ -164,6 +164,7 @@ abstract class Toolkit_FileServer_AdapterAbstract
             CURLOPT_URL            => IS_SUBMIT_URL,
             CURLOPT_HEADER         => 0,
             CURLOPT_RETURNTRANSFER => 1,
+            CURLOPT_SSL_VERIFYPEER => 0,
             CURLOPT_POSTFIELDS     => $fileData
         );
         curl_setopt_array($ch, $curlOptions);
@@ -322,6 +323,7 @@ abstract class Toolkit_FileServer_AdapterAbstract
                 CURLOPT_URL            => IS_SUBMIT_URL,
                 CURLOPT_HEADER         => 0,
                 CURLOPT_RETURNTRANSFER => 1,
+                CURLOPT_SSL_VERIFYPEER => 0,
                 CURLOPT_POSTFIELDS     => $fileData
             );
             curl_setopt_array($ch, $curlOptions);
index 324faee..1071414 100644 (file)
@@ -139,6 +139,7 @@ class Toolkit_FileServer_ImageAdapter extends Toolkit_FileServer_AdapterAbstract
             CURLOPT_URL            => "{$image}/info",
             CURLOPT_HEADER         => 0,
             CURLOPT_RETURNTRANSFER => 1,
+            CURLOPT_SSL_VERIFYPEER => 0,
             CURLOPT_POSTFIELDS     => $fileData
         );
         curl_setopt_array($ch, $curlOptions);
@@ -192,6 +193,7 @@ class Toolkit_FileServer_ImageAdapter extends Toolkit_FileServer_AdapterAbstract
             CURLOPT_URL            => IS_SUBMIT_URL,
             CURLOPT_HEADER         => 0,
             CURLOPT_RETURNTRANSFER => 1,
+            CURLOPT_SSL_VERIFYPEER => 0,
             CURLOPT_POSTFIELDS     => $fileData
         );
         curl_setopt_array($ch, $curlOptions);
index 560bf58..3836dbb 100644 (file)
@@ -59,6 +59,7 @@ if (!$isAuthorized) {
     $ch = curl_init($fileUrlPath);
     curl_setopt($ch, CURLOPT_TIMEOUT, 50);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
     $imageResponse = curl_exec($ch);
     if (!curl_errno($ch)) {
         $bytes = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
@@ -82,6 +83,7 @@ if (!$isAuthorized) {
     $ch = curl_init($fileUrlPath);
     curl_setopt($ch, CURLOPT_TIMEOUT, 50);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
     $imageResponse = curl_exec($ch);
     header("Pragma: public");
     header("Expires: 0");
index 85b5987..f8638a6 100644 (file)
@@ -348,6 +348,7 @@ class Toolkit_Videos_Video
             $curlOptions = array(
                 CURLOPT_URL            => $url,
                 CURLOPT_HEADER         => 0,
+                CURLOPT_SSL_VERIFYPEER => 0,
                 CURLOPT_RETURNTRANSFER => 1
             );
             curl_setopt_array($ch, $curlOptions);