Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2372)

Unified Diff: download_action.cc

Issue 3592008: AU: Verify delta payload signature and signed hash. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: move /tmp files to /var/run Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « delta_performer_unittest.cc ('k') | omaha_hash_calculator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_action.cc
diff --git a/download_action.cc b/download_action.cc
index 6b277224b59ead8678f026dcfe0e4fabdb6be8d2..608eeb9bb65b51f00445bc6c514ec7b186fa4dbb 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -150,6 +150,11 @@ void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
<< " failed. Expected size " << install_plan_.size
<< " but got size " << bytes_received_;
code = kActionCodeDownloadSizeMismatchError;
+ } else if (!install_plan_.is_full_update &&
+ !delta_performer_->VerifyPayload("")) {
+ LOG(ERROR) << "Download of " << install_plan_.download_url
+ << " failed due to payload verification error.";
+ code = kActionCodeDownloadPayloadVerificationError;
}
}
« no previous file with comments | « delta_performer_unittest.cc ('k') | omaha_hash_calculator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698