diff options
author | nashe <thomas@chauchefoin.fr> | 2017-07-13 13:04:28 +0100 |
---|---|---|
committer | nashe <thomas@chauchefoin.fr> | 2017-07-13 13:04:28 +0100 |
commit | 8406cec349ca59a62004efe3bc01124a609219fa (patch) | |
tree | 8e5d30a7217da0f23cd372da2adf3fb940885c46 /app | |
parent | 6f3a001bfa95b1a0ee3ecc867d1ab8a52051b014 (diff) | |
download | planet-8406cec349ca59a62004efe3bc01124a609219fa.tar planet-8406cec349ca59a62004efe3bc01124a609219fa.tar.gz planet-8406cec349ca59a62004efe3bc01124a609219fa.tar.bz2 planet-8406cec349ca59a62004efe3bc01124a609219fa.tar.xz planet-8406cec349ca59a62004efe3bc01124a609219fa.zip |
Add an option to disable feed certificate check
Diffstat (limited to 'app')
-rw-r--r-- | app/classes/Planet.php | 7 | ||||
-rw-r--r-- | app/classes/PlanetConfig.php | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/classes/Planet.php b/app/classes/Planet.php index aa323ee..39b55f6 100644 --- a/app/classes/Planet.php +++ b/app/classes/Planet.php @@ -181,6 +181,13 @@ class Planet $this->errors[] = new PlanetError(1, 'Forced from cache : '.$feed->getFeed()); } + if ($this->config->checkcerts === false) { + $feed->set_curl_options([ + CURLOPT_SSL_VERIFYHOST => false, + CURLOPT_SSL_VERIFYPEER => false + ]); + } + //Load feed $feed->init(); $isDown = ''; diff --git a/app/classes/PlanetConfig.php b/app/classes/PlanetConfig.php index 4838ba0..4348524 100644 --- a/app/classes/PlanetConfig.php +++ b/app/classes/PlanetConfig.php @@ -20,7 +20,8 @@ class PlanetConfig 'postmaxlength' => 0, 'categories' => '', 'cachedir' => './cache', - 'debug' => false + 'debug' => false, + 'checkcerts' => true, ); /** |