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

Unified Diff: download_action.cc

Issue 6778029: AU: detect failure when using public key verification (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 9 years, 9 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
« delta_performer.cc ('K') | « delta_performer_unittest.cc ('k') | no next file » | 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 d6ae97dfefc5eec167fab74d725b7aba6ae85d33..afc2d65333f672547e4889f58c790b1579799428 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -161,9 +161,11 @@ void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
successful ? kActionCodeSuccess : kActionCodeDownloadTransferError;
if (code == kActionCodeSuccess) {
if (!install_plan_.is_full_update) {
+ bool public_key_verify_failed = false;
if (!delta_performer_->VerifyPayload("",
install_plan_.download_hash,
- install_plan_.size)) {
+ install_plan_.size,
+ &public_key_verify_failed)) {
LOG(ERROR) << "Download of " << install_plan_.download_url
<< " failed due to payload verification error.";
code = kActionCodeDownloadPayloadVerificationError;
@@ -175,6 +177,9 @@ void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
LOG(ERROR) << "Unable to get new partition hash info.";
code = kActionCodeDownloadNewPartitionInfoError;
}
+ if (!public_key_verify_failed) {
+ // TODO(adlr): squash the http verify failure warning
petkov 2011/03/30 21:04:42 what do you mean?
adlr 2011/03/30 21:52:19 Removed this code and made a cleaner comment
+ }
} else {
// Makes sure the hash and size are correct for an old-style full update.
omaha_hash_calculator_.Finalize();
« delta_performer.cc ('K') | « delta_performer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698