diff --git a/index.php b/index.php index 31142c90..24aad88c 100644 --- a/index.php +++ b/index.php @@ -688,12 +688,12 @@ public function verifyIntegrity() { -----END CERTIFICATE----- EOF; - $validSignature = (bool)openssl_verify( + $validSignature = openssl_verify( file_get_contents($this->getDownloadedFilePath()), base64_decode($response['signature']), $certificate, OPENSSL_ALGO_SHA512 - ); + ) === 1; if ($validSignature === false) { throw new \Exception('Signature of update is not valid'); diff --git a/lib/Updater.php b/lib/Updater.php index 8e5825a8..06f65e8b 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -652,12 +652,12 @@ public function verifyIntegrity() { -----END CERTIFICATE----- EOF; - $validSignature = (bool)openssl_verify( + $validSignature = openssl_verify( file_get_contents($this->getDownloadedFilePath()), base64_decode($response['signature']), $certificate, OPENSSL_ALGO_SHA512 - ); + ) === 1; if ($validSignature === false) { throw new \Exception('Signature of update is not valid');