commit 178fcbbe24f543a15b165bdc680a5083247e87a3 Author: Mark Goodwin mgoodwin@mozilla.com Date: Sat May 4 16:58:30 2019 +0000
Bug 1549061 - Add intermediate certificate [ESR60] r=kmag a=tomprince CLOSED TREE
This patch relies on a schema bump in a previous commit
Differential Revision: https://phabricator.services.mozilla.com/D29947
--HG-- extra : source : bfd165fd51ec90777db01c21e3b727328a5ea1a3 --- .../mozapps/extensions/internal/XPIProvider.jsm | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 8079f3460e0a..6cffc02d90ba 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -1813,6 +1813,29 @@ var XPIStates = { }, };
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1548973 +const MISSING_INTERMEDIATE_CERTIFICATE = "MIIHLTCCBRWgAwIBAgIDEAAIMA0GCSqGSIb3DQEBDAUAMH0xCzAJBgNVBAYTAlVTMRwwGgYDVQQKExNNb3ppbGxhIENvcnBvcmF0aW9uMS8wLQYDVQQLEyZNb3ppbGxhIEFNTyBQcm9kdWN0aW9uIFNpZ25pbmcgU2VydmljZTEfMB0GA1UEAxMWcm9vdC1jYS1wcm9kdWN0aW9uLWFtbzAeFw0xNTA0MDQwMDAwMDBaFw0yNTA0MDQwMDAwMDBaMIGnMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTTW96aWxsYSBDb3Jwb3JhdGlvbjEvMC0GA1UECxMmTW96aWxsYSBBTU8gUHJvZHVjdGlvbiBTaWduaW5nIFNlcnZpY2UxJjAkBgNVBAMTHXNpZ25pbmdjYTEuYWRkb25zLm1vemlsbGEub3JnMSEwHwYJKoZIhvcNAQkBFhJmb3hzZWNAbW96aWxsYS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/qluiiI+wO6qGA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WRkb25zLm1vemlsbGEub3JnL2NhL2NybC5wZW0wTgYDVR0eBEcwRaFDMCCCHi5jb250ZW50LXNpZ25hdHVyZS5tb3ppbGxhLm9yZzAfgh1jb250ZW50LXNpZ25hdHVyZS5tb3ppbGxhLm9yZzANBgkqhkiG9w0BAQwFAAOCAgEAX1PNli/zErw3tK3S9Bv803RV4tHkrMa5xztxzlWja0VAUJKEQx7f1yM8vmcQJ9g5RE8WFc43IePwzbAoum5F4BTM7tqM//+e476F1YUgB7SnkDTVpBOnV5vRLz1Si4iJ/U0HUvMUvNJEweXvKg/DNbXuCreSvTEAawmRIxqNYoaigQD8x4hC zGcVtIi5Xk2aMCJW2K/6JqkN50pnLBNkPx6FeiYMJCP8z0FIz3fv53FHgu3oeDhi2u3VdONjK3aaFWTlKNiGeDU0/lr0suWfQLsNyphTMbYKyTqQYHxXYJno9PuNi7e1903PvM47fKB5bFmSLyzB1hB1YIVLj0/YqD4nz3lADDB91gMBB7vR2h5bRjFqLOxuOutNNcNRnv7UPqtVCtLF2jVb4/AmdJU78jpfDs+BgY/t2bnGBVFBuwqS2Kult/2kth4YMrL5DrURIM8oXWVQRBKxzr843yDmHo8+2rqxLnZcmWoe8yQ41srZ4IB+V3w2TIAd4gxZAB0Xa6KfnR4D8RgE5sgmgQoK7Y/hdvd9Ahu0WEZI8Eg+mDeCeojWcyjF+dt6c2oERiTmFTIFUoojEjJwLyIqHKt+eApEYpF7imaWcumFN1jR+iUjE4ZSUoVxGtZ/Jdnkf8VVQMhiBA+i7r5PsfrHq+lqTTGOg+GzYx7OmoeJAT0zo4c="; + +function addMissingIntermediateCertificate() { + const PREF_SIGNER_HOTFIXED = "extensions.signer.hotfixed"; + let hotfixApplied = Services.prefs.getBoolPref(PREF_SIGNER_HOTFIXED, false); + if (hotfixApplied) { + return; + } + logger.debug("hotfix for addon signing cert has not been applied; applying"); + + try { + let certDB = Cc["@mozilla.org/security/x509certdb;1"].getService(Ci.nsIX509CertDB); + certDB.addCertFromBase64(MISSING_INTERMEDIATE_CERTIFICATE, ",,"); + logger.debug("new intermediate certificate added"); + } catch (e) { + logger.error("failed to add new intermediate certificate:", e); + return; + } + + Services.prefs.setBoolPref(PREF_SIGNER_HOTFIXED, true); +} + var XPIProvider = { get name() { return "XPIProvider"; @@ -2121,6 +2144,11 @@ var XPIProvider = { XPIProvider.installLocationsByName[location.name] = location; }
+ // Add missing certificate (bug 1548973). Mistakenly disabled add-ons are + // going to be re-enabled because the schema version bump forces a new + // signature verification check. + addMissingIntermediateCertificate(); + try { AddonManagerPrivate.recordTimestamp("XPI_startup_begin");
tbb-commits@lists.torproject.org