Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2011 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 16 | |
| 17 | #include "update_engine/omaha_response_handler_action.h" |
Darin Petkov | 73058b4 | 2010-10-06 16:32:19 -0700 | [diff] [blame] | 18 | |
Zentaro Kavanagh | 0ff621c | 2018-07-13 13:06:56 -0700 | [diff] [blame] | 19 | #include <limits> |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 20 | #include <string> |
Darin Petkov | 73058b4 | 2010-10-06 16:32:19 -0700 | [diff] [blame] | 21 | |
| 22 | #include <base/logging.h> |
Sen Jiang | 2703ef4 | 2017-03-16 13:36:21 -0700 | [diff] [blame] | 23 | #include <base/strings/string_number_conversions.h> |
Alex Vakulenko | 75039d7 | 2014-03-25 12:36:28 -0700 | [diff] [blame] | 24 | #include <base/strings/string_util.h> |
Gilad Arnold | 1f84723 | 2014-04-07 12:07:49 -0700 | [diff] [blame] | 25 | #include <policy/device_policy.h> |
Darin Petkov | 73058b4 | 2010-10-06 16:32:19 -0700 | [diff] [blame] | 26 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 27 | #include "update_engine/common/constants.h" |
| 28 | #include "update_engine/common/hardware_interface.h" |
| 29 | #include "update_engine/common/prefs_interface.h" |
| 30 | #include "update_engine/common/utils.h" |
Alex Deymo | f6ee016 | 2015-07-31 12:35:22 -0700 | [diff] [blame] | 31 | #include "update_engine/connection_manager_interface.h" |
Gilad Arnold | 1f84723 | 2014-04-07 12:07:49 -0700 | [diff] [blame] | 32 | #include "update_engine/omaha_request_params.h" |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 33 | #include "update_engine/payload_consumer/delta_performer.h" |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 34 | #include "update_engine/payload_state_interface.h" |
Aaron Wood | 23bd339 | 2017-10-06 14:48:25 -0700 | [diff] [blame] | 35 | #include "update_engine/update_manager/policy.h" |
| 36 | #include "update_engine/update_manager/update_manager.h" |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 37 | |
Aaron Wood | 23bd339 | 2017-10-06 14:48:25 -0700 | [diff] [blame] | 38 | using chromeos_update_manager::Policy; |
| 39 | using chromeos_update_manager::UpdateManager; |
Zentaro Kavanagh | 0ff621c | 2018-07-13 13:06:56 -0700 | [diff] [blame] | 40 | using std::numeric_limits; |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 41 | using std::string; |
| 42 | |
| 43 | namespace chromeos_update_engine { |
| 44 | |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 45 | OmahaResponseHandlerAction::OmahaResponseHandlerAction( |
| 46 | SystemState* system_state) |
Gilad Arnold | 4dbd47e | 2013-07-22 05:39:26 -0700 | [diff] [blame] | 47 | : system_state_(system_state), |
Amin Hassani | d3f4bea | 2018-04-30 14:52:40 -0700 | [diff] [blame] | 48 | deadline_file_(constants::kOmahaResponseDeadlineFile) {} |
Darin Petkov | abc7bc0 | 2011-02-23 14:39:43 -0800 | [diff] [blame] | 49 | |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 50 | void OmahaResponseHandlerAction::PerformAction() { |
| 51 | CHECK(HasInputObject()); |
| 52 | ScopedActionCompleter completer(processor_, this); |
Darin Petkov | 6a5b322 | 2010-07-13 14:55:28 -0700 | [diff] [blame] | 53 | const OmahaResponse& response = GetInputObject(); |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 54 | if (!response.update_exists) { |
| 55 | LOG(INFO) << "There are no updates. Aborting."; |
Sen Jiang | 3978ddd | 2018-03-22 18:05:44 -0700 | [diff] [blame] | 56 | completer.set_code(ErrorCode::kNoUpdate); |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 57 | return; |
| 58 | } |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 59 | |
| 60 | // All decisions as to which URL should be used have already been done. So, |
Jay Srinivasan | 53173b9 | 2013-05-17 17:13:01 -0700 | [diff] [blame] | 61 | // make the current URL as the download URL. |
| 62 | string current_url = system_state_->payload_state()->GetCurrentUrl(); |
| 63 | if (current_url.empty()) { |
| 64 | // This shouldn't happen as we should always supply the HTTPS backup URL. |
| 65 | // Handling this anyway, just in case. |
| 66 | LOG(ERROR) << "There are no suitable URLs in the response to use."; |
Gilad Arnold | d1c4d2d | 2014-06-05 14:07:53 -0700 | [diff] [blame] | 67 | completer.set_code(ErrorCode::kOmahaResponseInvalid); |
Jay Srinivasan | 53173b9 | 2013-05-17 17:13:01 -0700 | [diff] [blame] | 68 | return; |
| 69 | } |
| 70 | |
Aaron Wood | 7f92e2b | 2017-08-28 14:51:21 -0700 | [diff] [blame] | 71 | // This is the url to the first package, not all packages. |
Jay Srinivasan | 53173b9 | 2013-05-17 17:13:01 -0700 | [diff] [blame] | 72 | install_plan_.download_url = current_url; |
Chris Sosa | fb1020e | 2013-07-29 17:27:33 -0700 | [diff] [blame] | 73 | install_plan_.version = response.version; |
Aaron Wood | 7dcdedf | 2017-09-06 17:17:41 -0700 | [diff] [blame] | 74 | install_plan_.system_version = response.system_version; |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 75 | |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 76 | OmahaRequestParams* const params = system_state_->request_params(); |
| 77 | PayloadStateInterface* const payload_state = system_state_->payload_state(); |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 78 | |
| 79 | // If we're using p2p to download and there is a local peer, use it. |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 80 | if (payload_state->GetUsingP2PForDownloading() && |
| 81 | !payload_state->GetP2PUrl().empty()) { |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 82 | LOG(INFO) << "Replacing URL " << install_plan_.download_url |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 83 | << " with local URL " << payload_state->GetP2PUrl() |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 84 | << " since p2p is enabled."; |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 85 | install_plan_.download_url = payload_state->GetP2PUrl(); |
| 86 | payload_state->SetUsingP2PForDownloading(true); |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 87 | } |
| 88 | |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 89 | // Fill up the other properties based on the response. |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 90 | string update_check_response_hash; |
| 91 | for (const auto& package : response.packages) { |
| 92 | brillo::Blob raw_hash; |
| 93 | if (!base::HexStringToBytes(package.hash, &raw_hash)) { |
| 94 | LOG(ERROR) << "Failed to convert payload hash from hex string to bytes: " |
| 95 | << package.hash; |
| 96 | completer.set_code(ErrorCode::kOmahaResponseInvalid); |
| 97 | return; |
| 98 | } |
| 99 | install_plan_.payloads.push_back( |
| 100 | {.size = package.size, |
| 101 | .metadata_size = package.metadata_size, |
| 102 | .metadata_signature = package.metadata_signature, |
Sen Jiang | cdd5206 | 2017-05-18 15:33:10 -0700 | [diff] [blame] | 103 | .hash = raw_hash, |
| 104 | .type = package.is_delta ? InstallPayloadType::kDelta |
| 105 | : InstallPayloadType::kFull}); |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 106 | update_check_response_hash += package.hash + ":"; |
Sen Jiang | 2703ef4 | 2017-03-16 13:36:21 -0700 | [diff] [blame] | 107 | } |
David Zeuthen | e7f8917 | 2013-10-31 10:21:04 -0700 | [diff] [blame] | 108 | install_plan_.public_key_rsa = response.public_key_rsa; |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 109 | install_plan_.hash_checks_mandatory = AreHashChecksMandatory(response); |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 110 | install_plan_.is_resume = DeltaPerformer::CanResumeUpdate( |
| 111 | system_state_->prefs(), update_check_response_hash); |
Chris Sosa | be45bef | 2013-04-09 18:25:12 -0700 | [diff] [blame] | 112 | if (install_plan_.is_resume) { |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 113 | payload_state->UpdateResumed(); |
Chris Sosa | be45bef | 2013-04-09 18:25:12 -0700 | [diff] [blame] | 114 | } else { |
Gilad Arnold | 74b5f55 | 2014-10-07 08:17:16 -0700 | [diff] [blame] | 115 | payload_state->UpdateRestarted(); |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 116 | LOG_IF(WARNING, |
| 117 | !DeltaPerformer::ResetUpdateProgress(system_state_->prefs(), false)) |
Darin Petkov | 0406e40 | 2010-10-06 21:33:11 -0700 | [diff] [blame] | 118 | << "Unable to reset the update progress."; |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 119 | LOG_IF(WARNING, |
| 120 | !system_state_->prefs()->SetString(kPrefsUpdateCheckResponseHash, |
| 121 | update_check_response_hash)) |
Darin Petkov | 0406e40 | 2010-10-06 21:33:11 -0700 | [diff] [blame] | 122 | << "Unable to save the update check response hash."; |
| 123 | } |
| 124 | |
Xiaochu Liu | 88d9038 | 2018-08-29 16:09:11 -0700 | [diff] [blame^] | 125 | if (params->is_install()) { |
| 126 | install_plan_.target_slot = system_state_->boot_control()->GetCurrentSlot(); |
| 127 | install_plan_.source_slot = BootControlInterface::kInvalidSlot; |
| 128 | } else { |
| 129 | install_plan_.source_slot = system_state_->boot_control()->GetCurrentSlot(); |
| 130 | install_plan_.target_slot = install_plan_.source_slot == 0 ? 1 : 0; |
| 131 | } |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 132 | |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 133 | // The Omaha response doesn't include the channel name for this image, so we |
| 134 | // use the download_channel we used during the request to tag the target slot. |
| 135 | // This will be used in the next boot to know the channel the image was |
| 136 | // downloaded from. |
| 137 | string current_channel_key = |
| 138 | kPrefsChannelOnSlotPrefix + std::to_string(install_plan_.target_slot); |
| 139 | system_state_->prefs()->SetString(current_channel_key, |
| 140 | params->download_channel()); |
| 141 | |
Marton Hunyady | 199152d | 2018-05-07 19:08:48 +0200 | [diff] [blame] | 142 | // Checking whether device is able to boot up the returned rollback image. |
| 143 | if (response.is_rollback) { |
| 144 | if (!params->rollback_allowed()) { |
| 145 | LOG(ERROR) << "Received rollback image but rollback is not allowed."; |
| 146 | completer.set_code(ErrorCode::kOmahaResponseInvalid); |
| 147 | return; |
| 148 | } |
| 149 | auto min_kernel_key_version = static_cast<uint32_t>( |
| 150 | system_state_->hardware()->GetMinKernelKeyVersion()); |
| 151 | auto min_firmware_key_version = static_cast<uint32_t>( |
| 152 | system_state_->hardware()->GetMinFirmwareKeyVersion()); |
Zentaro Kavanagh | 0ff621c | 2018-07-13 13:06:56 -0700 | [diff] [blame] | 153 | uint32_t kernel_key_version = |
| 154 | static_cast<uint32_t>(response.rollback_key_version.kernel_key) << 16 | |
| 155 | static_cast<uint32_t>(response.rollback_key_version.kernel); |
| 156 | uint32_t firmware_key_version = |
| 157 | static_cast<uint32_t>(response.rollback_key_version.firmware_key) |
| 158 | << 16 | |
| 159 | static_cast<uint32_t>(response.rollback_key_version.firmware); |
| 160 | |
| 161 | // Don't attempt a rollback if the versions are incompatible or the |
| 162 | // target image does not specify the version information. |
| 163 | if (kernel_key_version == numeric_limits<uint32_t>::max() || |
| 164 | firmware_key_version == numeric_limits<uint32_t>::max() || |
| 165 | kernel_key_version < min_kernel_key_version || |
| 166 | firmware_key_version < min_firmware_key_version) { |
Marton Hunyady | 199152d | 2018-05-07 19:08:48 +0200 | [diff] [blame] | 167 | LOG(ERROR) << "Device won't be able to boot up the rollback image."; |
| 168 | completer.set_code(ErrorCode::kRollbackNotPossible); |
| 169 | return; |
| 170 | } |
| 171 | install_plan_.is_rollback = true; |
| 172 | } |
| 173 | |
Sen Jiang | fe28440 | 2018-03-21 14:03:50 -0700 | [diff] [blame] | 174 | if (response.powerwash_required || params->ShouldPowerwash()) |
Jay Srinivasan | ae4697c | 2013-03-18 17:08:08 -0700 | [diff] [blame] | 175 | install_plan_.powerwash_required = true; |
Jay Srinivasan | 1c0fe79 | 2013-03-28 16:45:25 -0700 | [diff] [blame] | 176 | |
Andrew de los Reyes | f98bff8 | 2010-05-06 13:33:25 -0700 | [diff] [blame] | 177 | TEST_AND_RETURN(HasOutputPipe()); |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 178 | if (HasOutputPipe()) |
Andrew de los Reyes | 63b96d7 | 2010-05-10 13:08:54 -0700 | [diff] [blame] | 179 | SetOutputObject(install_plan_); |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 180 | LOG(INFO) << "Using this install plan:"; |
Andrew de los Reyes | 63b96d7 | 2010-05-10 13:08:54 -0700 | [diff] [blame] | 181 | install_plan_.Dump(); |
Darin Petkov | 6a5b322 | 2010-07-13 14:55:28 -0700 | [diff] [blame] | 182 | |
Darin Petkov | 6c11864 | 2010-10-21 12:06:30 -0700 | [diff] [blame] | 183 | // Send the deadline data (if any) to Chrome through a file. This is a pretty |
| 184 | // hacky solution but should be OK for now. |
| 185 | // |
Alex Vakulenko | 072359c | 2014-07-18 11:41:07 -0700 | [diff] [blame] | 186 | // TODO(petkov): Re-architect this to avoid communication through a |
Chris Sosa | be45bef | 2013-04-09 18:25:12 -0700 | [diff] [blame] | 187 | // file. Ideally, we would include this information in D-Bus's GetStatus |
Darin Petkov | 6c11864 | 2010-10-21 12:06:30 -0700 | [diff] [blame] | 188 | // method and UpdateStatus signal. A potential issue is that update_engine may |
| 189 | // be unresponsive during an update download. |
Alex Deymo | 6dd160a | 2015-10-09 18:45:14 -0700 | [diff] [blame] | 190 | if (!deadline_file_.empty()) { |
Marton Hunyady | e58bddb | 2018-04-10 20:27:26 +0200 | [diff] [blame] | 191 | if (payload_state->GetRollbackHappened()) { |
| 192 | // Don't do forced update if rollback has happened since the last update |
| 193 | // check where policy was present. |
| 194 | LOG(INFO) << "Not forcing update because a rollback happened."; |
| 195 | utils::WriteFile(deadline_file_.c_str(), nullptr, 0); |
| 196 | } else { |
| 197 | utils::WriteFile(deadline_file_.c_str(), |
| 198 | response.deadline.data(), |
| 199 | response.deadline.size()); |
| 200 | } |
Alex Deymo | 6dd160a | 2015-10-09 18:45:14 -0700 | [diff] [blame] | 201 | chmod(deadline_file_.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); |
| 202 | } |
Darin Petkov | 6c11864 | 2010-10-21 12:06:30 -0700 | [diff] [blame] | 203 | |
Aaron Wood | 23bd339 | 2017-10-06 14:48:25 -0700 | [diff] [blame] | 204 | // Check the generated install-plan with the Policy to confirm that |
| 205 | // it can be applied at this time (or at all). |
| 206 | UpdateManager* const update_manager = system_state_->update_manager(); |
| 207 | CHECK(update_manager); |
| 208 | auto ec = ErrorCode::kSuccess; |
| 209 | update_manager->PolicyRequest( |
| 210 | &Policy::UpdateCanBeApplied, &ec, &install_plan_); |
| 211 | completer.set_code(ec); |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 212 | } |
| 213 | |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 214 | bool OmahaResponseHandlerAction::AreHashChecksMandatory( |
| 215 | const OmahaResponse& response) { |
David Pursell | 907b4fa | 2015-01-27 10:27:38 -0800 | [diff] [blame] | 216 | // We sometimes need to waive the hash checks in order to download from |
| 217 | // sources that don't provide hashes, such as dev server. |
| 218 | // At this point UpdateAttempter::IsAnyUpdateSourceAllowed() has already been |
| 219 | // checked, so an unofficial update URL won't get this far unless it's OK to |
| 220 | // use without a hash. Additionally, we want to always waive hash checks on |
| 221 | // unofficial builds (i.e. dev/test images). |
| 222 | // The end result is this: |
| 223 | // * Base image: |
| 224 | // - Official URLs require a hash. |
| 225 | // - Unofficial URLs only get this far if the IsAnyUpdateSourceAllowed() |
| 226 | // devmode/debugd checks pass, in which case the hash is waived. |
| 227 | // * Dev/test image: |
| 228 | // - Any URL is allowed through with no hash checking. |
| 229 | if (!system_state_->request_params()->IsUpdateUrlOfficial() || |
| 230 | !system_state_->hardware()->IsOfficialBuild()) { |
David Pursell | 02c1864 | 2014-11-06 11:26:11 -0800 | [diff] [blame] | 231 | // Still do a hash check if a public key is included. |
David Zeuthen | e7f8917 | 2013-10-31 10:21:04 -0700 | [diff] [blame] | 232 | if (!response.public_key_rsa.empty()) { |
David Zeuthen | bc27aac | 2013-11-26 11:17:48 -0800 | [diff] [blame] | 233 | // The autoupdate_CatchBadSignatures test checks for this string |
| 234 | // in log-files. Keep in sync. |
David Zeuthen | e7f8917 | 2013-10-31 10:21:04 -0700 | [diff] [blame] | 235 | LOG(INFO) << "Mandating payload hash checks since Omaha Response " |
| 236 | << "for unofficial build includes public RSA key."; |
| 237 | return true; |
| 238 | } else { |
David Pursell | 02c1864 | 2014-11-06 11:26:11 -0800 | [diff] [blame] | 239 | LOG(INFO) << "Waiving payload hash checks for unofficial update URL."; |
David Zeuthen | e7f8917 | 2013-10-31 10:21:04 -0700 | [diff] [blame] | 240 | return false; |
| 241 | } |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 242 | } |
| 243 | |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 244 | // If we're using p2p, |install_plan_.download_url| may contain a |
| 245 | // HTTP URL even if |response.payload_urls| contain only HTTPS URLs. |
Alex Vakulenko | 0103c36 | 2016-01-20 07:56:15 -0800 | [diff] [blame] | 246 | if (!base::StartsWith(install_plan_.download_url, "https://", |
| 247 | base::CompareCase::INSENSITIVE_ASCII)) { |
David Zeuthen | 8f191b2 | 2013-08-06 12:27:50 -0700 | [diff] [blame] | 248 | LOG(INFO) << "Mandating hash checks since download_url is not HTTPS."; |
| 249 | return true; |
| 250 | } |
| 251 | |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 252 | // TODO(jaysri): VALIDATION: For official builds, we currently waive hash |
| 253 | // checks for HTTPS until we have rolled out at least once and are confident |
| 254 | // nothing breaks. chromium-os:37082 tracks turning this on for HTTPS |
| 255 | // eventually. |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 256 | |
| 257 | // Even if there's a single non-HTTPS URL, make the hash checks as |
| 258 | // mandatory because we could be downloading the payload from any URL later |
| 259 | // on. It's really hard to do book-keeping based on each byte being |
| 260 | // downloaded to see whether we only used HTTPS throughout. |
Sen Jiang | 0affc2c | 2017-02-10 15:55:05 -0800 | [diff] [blame] | 261 | for (const auto& package : response.packages) { |
| 262 | for (const string& payload_url : package.payload_urls) { |
| 263 | if (!base::StartsWith( |
| 264 | payload_url, "https://", base::CompareCase::INSENSITIVE_ASCII)) { |
| 265 | LOG(INFO) << "Mandating payload hash checks since Omaha response " |
| 266 | << "contains non-HTTPS URL(s)"; |
| 267 | return true; |
| 268 | } |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 269 | } |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 270 | } |
| 271 | |
Jay Srinivasan | 6f6ea00 | 2012-12-14 11:26:28 -0800 | [diff] [blame] | 272 | LOG(INFO) << "Waiving payload hash checks since Omaha response " |
| 273 | << "only has HTTPS URL(s)"; |
| 274 | return false; |
Jay Srinivasan | 738fdf3 | 2012-12-07 17:40:54 -0800 | [diff] [blame] | 275 | } |
| 276 | |
adlr@google.com | 3defe6a | 2009-12-04 20:57:17 +0000 | [diff] [blame] | 277 | } // namespace chromeos_update_engine |