Bug 1468362: Remove ADDON_SINGING buildconfig setting. r=aswan

MozReview-Commit-ID: MeD4VQPVf6

--HG--
extra : rebase_source : c40ed5b7d194290332f0aa77deaf91812de48c42
extra : histedit_source : 34a69d708597fcdbfb9bffccd7dbf28c9d1a42a7
This commit is contained in:
Kris Maglione 2018-06-12 13:56:58 -04:00
parent 6c319f9507
commit 0506a56751
18 changed files with 25 additions and 72 deletions

View File

@ -14,7 +14,6 @@ unset MAKECAB
# --enable-crashreporter
# --enable-release
# LLVM_CONFIG
# MOZ_ADDON_SIGNING
# MOZ_REQUIRE_SIGNING
# --enable-js-shell
# build/mozconfig.automation

View File

@ -67,8 +67,5 @@ fi
MOZ_PROFILE_MIGRATOR=1
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=1
# Include the DevTools client, not just the server (which is the default)
MOZ_DEVTOOLS=all

View File

@ -14,8 +14,6 @@ mk_add_options AUTOCLOBBER=1
ac_add_options --enable-crashreporter
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}

View File

@ -39,6 +39,3 @@ MOZ_RAW=1
MOZ_USE_NATIVE_POPUP_WINDOWS=1
MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110}
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=1

View File

@ -4120,10 +4120,6 @@ if test -n "$MOZ_BINARY_EXTENSIONS"; then
AC_DEFINE(MOZ_BINARY_EXTENSIONS)
fi
AC_SUBST(MOZ_ADDON_SIGNING)
if test "$MOZ_ADDON_SIGNING" = 1; then
AC_DEFINE(MOZ_ADDON_SIGNING)
fi
AC_SUBST(MOZ_REQUIRE_SIGNING)
if test "$MOZ_REQUIRE_SIGNING" = 1; then
AC_DEFINE(MOZ_REQUIRE_SIGNING)

View File

@ -91,7 +91,6 @@ def build_dict(config, env=os.environ):
d['telemetry'] = substs.get('MOZ_TELEMETRY_REPORTING') == '1'
d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
d['addon_signing'] = substs.get('MOZ_ADDON_SIGNING') == '1'
d['require_signing'] = substs.get('MOZ_REQUIRE_SIGNING') == '1'
d['allow_legacy_extensions'] = substs.get('MOZ_ALLOW_LEGACY_EXTENSIONS') == '1'
d['official'] = bool(substs.get('MOZILLA_OFFICIAL'))

View File

@ -18,12 +18,6 @@ config = {
("browser/confvars.sh",
"MAR_CHANNEL_ID=firefox-mozilla-release",
"MAR_CHANNEL_ID=firefox-mozilla-esr"),
("build/mozconfig.common",
"# Enable checking that add-ons are signed by the trusted root",
"# Disable checking that add-ons are signed by the trusted root"),
("build/mozconfig.common",
"MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}",
"MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0}"),
("build/mozconfig.common",
"# Enable enforcing that add-ons are signed by the trusted root",
"# Disable enforcing that add-ons are signed by the trusted root"),

View File

@ -677,7 +677,7 @@ function checkSystemSection(data) {
}
function checkActiveAddon(data, partialRecord) {
let signedState = mozinfo.addon_signing ? "number" : "undefined";
let signedState = "number";
// system add-ons have an undefined signState
if (data.isSystem)
signedState = "undefined";
@ -1218,7 +1218,7 @@ add_task(async function test_addonsAndPlugins() {
hasBinaryComponents: false,
installDay: ADDON_INSTALL_DATE,
updateDay: ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
isSystem: false,
isWebExtension: true,
multiprocessCompatible: true,
@ -1258,7 +1258,7 @@ add_task(async function test_addonsAndPlugins() {
hasBinaryComponents: false,
installDay: WEBEXTENSION_ADDON_INSTALL_DATE,
updateDay: WEBEXTENSION_ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
isSystem: false,
isWebExtension: true,
multiprocessCompatible: true,
@ -1375,7 +1375,7 @@ add_task(async function test_signedAddon() {
hasBinaryComponents: false,
installDay: ADDON_INSTALL_DATE,
updateDay: ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_SIGNED,
};
let deferred = PromiseUtils.defer();
@ -1460,8 +1460,7 @@ add_task(async function test_collectionWithbrokenAddonData() {
hasBinaryComponents: false,
installDay: ADDON_INSTALL_DATE,
updateDay: ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_MISSING :
AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_MISSING,
};
let receivedNotifications = 0;

View File

@ -222,13 +222,6 @@ this.AppConstants = Object.freeze({
false,
#endif
MOZ_ADDON_SIGNING:
#ifdef MOZ_ADDON_SIGNING
true,
#else
false,
#endif
MOZ_REQUIRE_SIGNING:
#ifdef MOZ_REQUIRE_SIGNING
true,

View File

@ -26,8 +26,6 @@ function makeConstant(name, value) {
});
}
makeConstant("ADDON_SIGNING", AppConstants.MOZ_ADDON_SIGNING);
if (AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {
makeConstant("REQUIRE_SIGNING", true);
makeConstant("LANGPACKS_REQUIRE_SIGNING", true);

View File

@ -2542,7 +2542,6 @@ this.XPIDatabaseReconcile = {
logger.debug(`Updating compatibility for add-on ${aOldAddon.id} in ${aLocation.name}`);
let checkSigning = (aOldAddon.signedState === undefined &&
AddonSettings.ADDON_SIGNING &&
SIGNED_TYPES.has(aOldAddon.type));
let manifest = null;

View File

@ -960,9 +960,9 @@ function shouldVerifySignedState(aAddon) {
if (aAddon.location.name == KEY_APP_SYSTEM_DEFAULTS)
return false;
// Otherwise only check signatures if signing is enabled and the add-on is one
// of the signed types.
return AddonSettings.ADDON_SIGNING && XPIDatabase.SIGNED_TYPES.has(aAddon.type);
// Otherwise only check signatures if the add-on is one of the signed
// types.
return XPIDatabase.SIGNED_TYPES.has(aAddon.type);
}
/**

View File

@ -192,7 +192,6 @@ function awaitPromise(promise) {
if (!success)
throw result;
return result;
}
/**

View File

@ -55,7 +55,7 @@ add_task(async function() {
Assert.ok(!addon.appDisabled);
Assert.ok(addon.isActive);
Assert.equal(addon.type, "extension");
Assert.equal(addon.signedState, mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_UNKNOWN : AddonManager.SIGNEDSTATE_NOT_REQUIRED);
Assert.equal(addon.signedState, AddonManager.SIGNEDSTATE_UNKNOWN);
Assert.ok(proxyFile.exists());

View File

@ -115,7 +115,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
let onShutdown = waitForBootstrapEvent("shutdown", ID);
@ -153,7 +153,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
let tempdir = gTmpD.clone();
@ -250,7 +250,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? signedState : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState,
});
// Now restart, the temporary addon will go away which should
@ -312,7 +312,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
Services.obs.notifyObservers(target, "flush-cache-entry");
@ -359,7 +359,7 @@ add_task(async function test_samefile() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
Services.obs.notifyObservers(webext, "flush-cache-entry");
@ -387,7 +387,7 @@ add_task(async function test_samefile() {
isActive: true,
type: "extension",
isWebExtension: true,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
await addon.uninstall();
@ -468,7 +468,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_UNKNOWN : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_UNKNOWN,
});
await addon.uninstall();
@ -486,7 +486,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
unpacked_addon.remove(true);
@ -720,7 +720,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_UNKNOWN : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_UNKNOWN,
});
await tempAddon.uninstall();
@ -741,7 +741,7 @@ add_task(async function() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
await addon.uninstall();
@ -770,7 +770,7 @@ add_task(async function() {
isActive: true,
type: "extension",
isWebExtension: false,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
await AddonManager.installTemporaryAddon(XPIS.test_bootstrap1_1);

View File

@ -95,7 +95,7 @@ add_task(async function test_1() {
isSystem: false,
type: "extension",
isWebExtension: true,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
iconURL: `${uri}icon48.png`,
icon64URL: `${uri}icon64.png`,
});
@ -122,7 +122,7 @@ add_task(async function test_1() {
isActive: true,
isSystem: false,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
iconURL: `${uri}icon48.png`,
icon64URL: `${uri}icon64.png`,
});
@ -168,7 +168,7 @@ add_task(async function test_2() {
isActive: true,
isSystem: false,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
await addon.uninstall();
@ -410,7 +410,7 @@ add_task(async function testThemeExtension() {
isSystem: false,
type: "theme",
isWebExtension: true,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
await addon.uninstall();
@ -456,7 +456,7 @@ add_task(async function test_theme_upgrade() {
appDisabled: false,
isActive: true,
type: "extension",
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
});
// Create a webextension theme with the same ID

View File

@ -20,10 +20,6 @@ const IMPLICIT_ID_ID = "webext_implicit_id@tests.mozilla.org";
// applications or browser_specific_settings, so its id comes
// from its signature, which should be the ID constant defined below.
add_task(async function test_implicit_id() {
// This test needs to read the xpi certificate which only works
// if signing is enabled.
ok(AddonSettings.ADDON_SIGNING, "Add-on signing is enabled");
let addon = await promiseAddonByID(IMPLICIT_ID_ID);
equal(addon, null, "Add-on is not installed");
@ -39,10 +35,6 @@ add_task(async function test_implicit_id() {
// and it should look just like the regular install (ie, the ID should
// come from the signature)
add_task(async function test_implicit_id_temp() {
// This test needs to read the xpi certificate which only works
// if signing is enabled.
ok(AddonSettings.ADDON_SIGNING, "Add-on signing is enabled");
let addon = await promiseAddonByID(IMPLICIT_ID_ID);
equal(addon, null, "Add-on is not installed");

View File

@ -76,7 +76,6 @@ tags = blocklist
[test_bootstrap_globals.js]
[test_bootstrapped_chrome_manifest.js]
[test_cache_certdb.js]
run-if = addon_signing
[test_cacheflush.js]
[test_childprocess.js]
[test_compatoverrides.js]
@ -195,21 +194,15 @@ tags = webextensions
[test_shutdown.js]
[test_sideloads.js]
[test_signed_inject.js]
run-if = addon_signing
# Bug 1394122
skip-if = true
[test_signed_install.js]
run-if = addon_signing
run-sequentially = Uses hardcoded ports in xpi files.
[test_signed_langpack.js]
run-if = addon_signing
[test_signed_long.js]
run-if = addon_signing
[test_signed_updatepref.js]
run-if = addon_signing
skip-if = require_signing || !allow_legacy_extensions
[test_signed_verify.js]
run-if = addon_signing
[test_softblocked.js]
tags = blocklist
[test_sourceURI.js]