From 4d8f3a80d515fb9ccaf186bc21992cf93e97c27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Helfensd=C3=B6rfer?= Date: Sat, 23 Mar 2019 13:05:18 +0100 Subject: [PATCH] Fixed ssl verification, closes #45 See http://php.net/manual/en/function.curl-setopt.php --- src/AutoUpdate.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AutoUpdate.php b/src/AutoUpdate.php index 7833bfc..449f6f6 100755 --- a/src/AutoUpdate.php +++ b/src/AutoUpdate.php @@ -587,7 +587,11 @@ protected function _downloadCurl($url) $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $this->sslVerifyHost); + if ($this->sslVerifyHost) { + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); + } else { + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); + } curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->sslVerifyHost); $update = curl_exec($curl);