Test for open_ssl in extensions.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 29 Sep 2017 11:29:49 +0000 (13:29 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 29 Sep 2017 11:29:49 +0000 (13:29 +0200)
includes/packages.inc

index 99b620d30eae15a87b8429adbdb47d52cb876f6e..2e1b92e3445d91c9ca3fa90dd8b4159736371a1b 100644 (file)
@@ -299,6 +299,10 @@ function get_pkg_or_list($type = null, $pkgname = null, $filter=array(), $outkey
                $sig = url_get_contents($repo.'/Release.sig');
                $data = file_get_contents($loclist);
                $cert = file_get_contents(PUBKEY_PATH.'/FA.pem');
+               if (!function_exists('openssl_verify')) {
+                       display_error(_("OpenSSL have to be available on your server to use extension repository system."));
+                       return null;
+               }       
                if (openssl_verify($data, $sig, $cert) <= 0) {
                        if ($refresh) {
                                if (!@unlink($loclist))