If a public key is present, disallow old style full payloads.
This is necessary to ensure that if a public key is present the payload is
signed and the signature passes verification.
BUG=chromium-os:11760
TEST=unit tests, tested on device
Change-Id: I6af61ead0e918c0b971dbcfeabcab3be03e6eb97
Review URL: http://codereview.chromium.org/6574009
diff --git a/update_attempter.cc b/update_attempter.cc
index 3ea1c18..949434e 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -456,12 +456,12 @@
return;
}
- // For now assume that Omaha response action failure means that
- // there's no update so don't send an event. Also, double check that
- // the failure has not occurred while sending an error event -- in
- // which case don't schedule another. This shouldn't really happen
- // but just in case...
- if (action->Type() == OmahaResponseHandlerAction::StaticType() ||
+ // For now assume that a generic Omaha response action failure means that
+ // there's no update so don't send an event. Also, double check that the
+ // failure has not occurred while sending an error event -- in which case
+ // don't schedule another. This shouldn't really happen but just in case...
+ if ((action->Type() == OmahaResponseHandlerAction::StaticType() &&
+ code == kActionCodeError) ||
status_ == UPDATE_STATUS_REPORTING_ERROR_EVENT) {
return;
}