Opkg support for smime (pkcs7) packages list signing
[oweals/opkg-lede.git] / libopkg / opkg_install.c
index 750ea652cf6229c55dd9903053091f70da3f2388..1bcaf2545126b129fc4231dc569c9a6254398c2b 100644 (file)
@@ -837,7 +837,7 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
      }
 
      /* check that the repository is valid */
-     #if HAVE_GPGME
+     #if defined(HAVE_GPGME) || defined(HAVE_OPENSSL)
      char *list_file_name, *sig_file_name, *lists_dir;
 
      /* check to ensure the package has come from a repository */
@@ -854,6 +854,8 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
        {
          if (opkg_verify_file (conf, list_file_name, sig_file_name))
            return OPKG_INSTALL_ERR_SIGNATURE;
+       }else{
+         return OPKG_INSTALL_ERR_SIGNATURE;
        }
 
        free (lists_dir);