Commit fcbfa3ec authored by Kathleen Brade's avatar Kathleen Brade Committed by Matthew Finkel
Browse files

Bug 19121: reinstate the update.xml hash check

This is a partial revert of commit f1241db6.

Revert the nsUpdateService.js changes from Mozilla Bug 862173 "don't
verify mar file hash when using mar signing to verify the mar file
(lessens main thread I/O)."

Changes to the tests were not reverted; the tests have been changed
significantly and we do not run automated updater tests for
Tor Browser at this time.

We kept the addition to the AppConstants API in case other JS code
references it in the future.
parent 38b4bae5
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -4403,13 +4403,6 @@ Downloader.prototype = {
    }

    LOG("Downloader:_verifyDownload downloaded size == expected size.");

    // The hash check is not necessary when mar signatures are used to verify
    // the downloaded mar file.
    if (AppConstants.MOZ_VERIFY_MAR_SIGNATURE) {
      return true;
    }

    let fileStream = Cc["@mozilla.org/network/file-input-stream;1"].
                     createInstance(Ci.nsIFileInputStream);
    fileStream.init(destination, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);