Bug 1234339 part 1, Inform the updater and maintenance service of the new SHA2 certificate issuer, r=callek, a=rkent THUNDERBIRD430b1_2015120717_RELBRANCH THUNDERBIRD_43_0b1_BUILD3 THUNDERBIRD_43_0b1_RELEASE
authorR Kent James <rkent@caspia.com>
Mon, 21 Dec 2015 13:53:07 -0800
changeset 23571 56df849bc63656a73c155b38792abc5ccdff456a
parent 23567 c8d8a3ada18e54d27219973486540baceac16e32
child 23572 ffbc0a5a1a2be43f78ea1bd2e0a8b2a35a175f3c
push id1546
push userkent@caspia.com
push dateMon, 21 Dec 2015 22:01:36 +0000
treeherdercomm-beta@56df849bc636 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscallek, rkent
Bug 1234339 part 1, Inform the updater and maintenance service of the new SHA2 certificate issuer, r=callek, a=rkent
--- a/mail/installer/windows/nsis/defines.nsi.in
+++ b/mail/installer/windows/nsis/defines.nsi.in
@@ -18,18 +18,22 @@
 !define AppRegNameNews        "Thunderbird (News)"
 !define ClientsRegName        "Mozilla Thunderbird"
 !define BrandShortName        "@MOZ_APP_DISPLAYNAME@"
 !define PreReleaseSuffix      "@PRE_RELEASE_SUFFIX@"
 !define BrandFullName         "${BrandFullNameInternal}${PreReleaseSuffix}"
-!define CERTIFICATE_NAME      "Mozilla Corporation"
-!define CERTIFICATE_ISSUER    "DigiCert Assured ID Code Signing CA-1"
+!define CERTIFICATE_NAME            "Mozilla Corporation"
+!define CERTIFICATE_ISSUER          "DigiCert SHA2 Assured ID Code Signing CA"
+; Changing the name or issuer requires us to have both the old and the new
+;  in the registry at the same time, temporarily.
+!define CERTIFICATE_NAME_PREVIOUS   "Mozilla Corporation"
+!define CERTIFICATE_ISSUER_PREVIOUS "DigiCert Assured ID Code Signing CA-1"
 # NO_INSTDIR_FROM_REG is defined for pre-releases which have a PreReleaseSuffix
 # (e.g. Alpha X, Beta X, etc.) to prevent finding a non-default installation
 # directory in the registry and using that as the default. This prevents
 # Beta releases built with official branding from finding an existing install
 # of an official release and defaulting to its installation directory.
 !if "@PRE_RELEASE_SUFFIX@" != ""
--- a/mail/installer/windows/nsis/maintenanceservice_installer.nsi
+++ b/mail/installer/windows/nsis/maintenanceservice_installer.nsi
@@ -214,17 +214,17 @@ Section "MaintenanceService"
   WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
   WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
   ; Included here for debug purposes only.  
   ; These keys are used to bypass the installation dir is a valid installation
   ; check from the service so that tests can be run.
   ; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation"
-  ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert Assured ID Code Signing CA-1"
+  ; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA"
   ${If} ${RunningX64}
     SetRegView lastused
 ; By renaming before deleting we improve things slightly in case
 ; there is a file in use error. In this case a new install can happen.
 Function un.RenameDelete
--- a/mail/installer/windows/nsis/shared.nsh
+++ b/mail/installer/windows/nsis/shared.nsh
@@ -572,16 +572,22 @@
     ; with at most one certificate.  A fallback certificate can only be used
     ; if the binary is replaced with a different certificate.
     ; We always use the 64bit registry for certs.
     ; This call is ignored on 32-bit systems.
     SetRegView 64
     DeleteRegKey HKLM "$R0"
     WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
     WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
+    ; These values associate the allowed certificates for the previous
+    ;  installation, so that we can update from it cleanly using the
+    ;  old updater.exe (which will still have this signature).
+    WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
+    WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
     SetRegView lastused
   ; Restore the previously used value back
   Pop $R0
 !define AddMaintCertKeys "!insertmacro AddMaintCertKeys"