From d16409c723495cef98ab691de5e03b87a7596038 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 2 Aug 2018 17:45:42 +0200 Subject: Fix store-signed packages There were multiple bugs in the way store signatures were created and verified. This patch should fix all issues, plus it adds auto-tests to catch regressions going forward. Change-Id: I903bcc7d2dc485b5ed4ee7448d1f1e1ac8242c29 Reviewed-by: Bernd Weimer --- src/main-lib/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main-lib/main.cpp') diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp index 3b4faa0e..37f3682d 100644 --- a/src/main-lib/main.cpp +++ b/src/main-lib/main.cpp @@ -189,6 +189,7 @@ void Main::setup(const DefaultConfiguration *cfg, const QStringList &deploymentW { // basics that are needed in multiple setup functions below m_noSecurity = cfg->noSecurity(); + m_developmentMode = cfg->developmentMode(); m_builtinAppsManifestDirs = cfg->builtinAppsManifestDirs(); m_installedAppsManifestDir = cfg->installedAppsManifestDir(); @@ -501,11 +502,15 @@ void Main::setupInstaller(const QString &appImageMountDir, const QStringList &ca m_applicationInstaller = ApplicationInstaller::createInstance(m_installationLocations, m_installedAppsManifestDir, appImageMountDir, + hardwareId(), &error); if (Q_UNLIKELY(!m_applicationInstaller)) throw Exception(Error::System, error); - if (m_noSecurity) { + + if (m_developmentMode) m_applicationInstaller->setDevelopmentMode(true); + + if (m_noSecurity) { m_applicationInstaller->setAllowInstallationOfUnsignedPackages(true); } else { QList caCertificateList; -- cgit v1.2.1