File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ class AutoUpdate
100100 */
101101 private $ onAllUpdateFinishCallbacks = [];
102102
103+ /**
104+ * If curl should verify the host certificate.
105+ *
106+ * @var bool
107+ */
108+ private $ sslVerifyHost = true ;
109+
103110 /**
104111 * Url to the update folder on the server.
105112 *
@@ -404,6 +411,24 @@ public function getSimulationResults()
404411 return $ this ->simulationResults ;
405412 }
406413
414+ /**
415+ * @return bool
416+ */
417+ public function getSslVerifyHost ()
418+ {
419+ return $ this ->sslVerifyHost ;
420+ }
421+
422+ /**
423+ * @param bool $sslVerifyHost
424+ */
425+ public function setSslVerifyHost ($ sslVerifyHost )
426+ {
427+ $ this ->sslVerifyHost = $ sslVerifyHost ;
428+
429+ return $ this ;
430+ }
431+
407432 /**
408433 * Check for a new version
409434 *
@@ -562,6 +587,8 @@ protected function _downloadCurl($url)
562587 $ curl = curl_init ();
563588 curl_setopt ($ curl , CURLOPT_URL , $ url );
564589 curl_setopt ($ curl , CURLOPT_RETURNTRANSFER , 1 );
590+ curl_setopt ($ curl , CURLOPT_SSL_VERIFYHOST , $ this ->sslVerifyHost );
591+ curl_setopt ($ curl , CURLOPT_SSL_VERIFYPEER , $ this ->sslVerifyHost );
565592 $ update = curl_exec ($ curl );
566593
567594 $ error = false ;
You can’t perform that action at this time.
0 commit comments