Add maximum timestamp to the payload.

Added a new field max_timestamp in the protobuf, from now on
update_engine will reject any payload without this field.
If the OS build timestamp is newer than the max_timestamp, the payload
will also be rejected to prevent downgrade.

Bug: 36232423
Test: update_engine_unittests

Merged-In: Ib20f5f35aaf41165013bada02bc8720917358237
Change-Id: Ib20f5f35aaf41165013bada02bc8720917358237
(cherry picked from commit 5011df680621eb477cad8b34f03fba5b542cc2f9)
(cherry picked from commit ccb01b2a3beb94094388de806bc15b210ebe8b11)
18 files changed
tree: 89394d5cd998608e4dadc5218c904349b1d602f0
  1. binder_bindings/
  2. client_library/
  3. common/
  4. dbus_bindings/
  5. init/
  6. payload_consumer/
  7. payload_generator/
  8. sample_images/
  9. scripts/
  10. update_manager/
  11. update_payload_key/
  12. .gitignore
  13. Android.mk
  14. MODULE_LICENSE_APACHE2
  15. NOTICE
  16. OWNERS
  17. PRESUBMIT.cfg
  18. PREUPLOAD.cfg
  19. UpdateEngine.conf
  20. WATCHLISTS
  21. binder_service_android.cc
  22. binder_service_android.h
  23. binder_service_brillo.cc
  24. binder_service_brillo.h
  25. boot_control_android.cc
  26. boot_control_android.h
  27. boot_control_chromeos.cc
  28. boot_control_chromeos.h
  29. boot_control_chromeos_unittest.cc
  30. boot_control_recovery.cc
  31. boot_control_recovery.h
  32. boot_control_recovery_stub.cc
  33. certificate_checker.cc
  34. certificate_checker.h
  35. certificate_checker_unittest.cc
  36. chrome_browser_proxy_resolver.cc
  37. chrome_browser_proxy_resolver.h
  38. chrome_browser_proxy_resolver_unittest.cc
  39. common_service.cc
  40. common_service.h
  41. common_service_unittest.cc
  42. connection_manager.cc
  43. connection_manager.h
  44. connection_manager_android.cc
  45. connection_manager_android.h
  46. connection_manager_interface.h
  47. connection_manager_unittest.cc
  48. connection_utils.cc
  49. connection_utils.h
  50. daemon.cc
  51. daemon.h
  52. daemon_state_android.cc
  53. daemon_state_android.h
  54. daemon_state_interface.h
  55. dbus_connection.cc
  56. dbus_connection.h
  57. dbus_service.cc
  58. dbus_service.h
  59. dbus_test_utils.h
  60. fake_file_writer.h
  61. fake_p2p_manager.h
  62. fake_p2p_manager_configuration.h
  63. fake_shill_proxy.cc
  64. fake_shill_proxy.h
  65. fake_system_state.cc
  66. fake_system_state.h
  67. generate_pc_file.sh
  68. hardware_android.cc
  69. hardware_android.h
  70. hardware_chromeos.cc
  71. hardware_chromeos.h
  72. hardware_chromeos_unittest.cc
  73. image_properties.h
  74. image_properties_android.cc
  75. image_properties_android_unittest.cc
  76. image_properties_chromeos.cc
  77. image_properties_chromeos_unittest.cc
  78. libcurl_http_fetcher.cc
  79. libcurl_http_fetcher.h
  80. libupdate_engine-client-test.pc.in
  81. libupdate_engine-client.pc.in
  82. local_coverage_rate
  83. main.cc
  84. metrics.cc
  85. metrics.h
  86. metrics_utils.cc
  87. metrics_utils.h
  88. metrics_utils_unittest.cc
  89. mock_certificate_checker.h
  90. mock_connection_manager.h
  91. mock_file_writer.h
  92. mock_omaha_request_params.h
  93. mock_p2p_manager.h
  94. mock_payload_state.h
  95. mock_power_manager.h
  96. mock_proxy_resolver.h
  97. mock_update_attempter.h
  98. network_selector.h
  99. network_selector_android.cc
  100. network_selector_android.h
  101. network_selector_interface.h
  102. network_selector_stub.cc
  103. network_selector_stub.h
  104. omaha_request_action.cc
  105. omaha_request_action.h
  106. omaha_request_action_unittest.cc
  107. omaha_request_params.cc
  108. omaha_request_params.h
  109. omaha_request_params_unittest.cc
  110. omaha_response.h
  111. omaha_response_handler_action.cc
  112. omaha_response_handler_action.h
  113. omaha_response_handler_action_unittest.cc
  114. omaha_utils.cc
  115. omaha_utils.h
  116. omaha_utils_unittest.cc
  117. p2p_manager.cc
  118. p2p_manager.h
  119. p2p_manager_unittest.cc
  120. parcelable_update_engine_status.cc
  121. parcelable_update_engine_status.h
  122. payload_state.cc
  123. payload_state.h
  124. payload_state_interface.h
  125. payload_state_unittest.cc
  126. power_manager_android.cc
  127. power_manager_android.h
  128. power_manager_chromeos.cc
  129. power_manager_chromeos.h
  130. power_manager_interface.h
  131. proxy_resolver.cc
  132. proxy_resolver.h
  133. proxy_resolver_unittest.cc
  134. pylintrc
  135. real_system_state.cc
  136. real_system_state.h
  137. run_unittests
  138. sample_omaha_v3_response.xml
  139. service_delegate_android_interface.h
  140. service_observer_interface.h
  141. shill_proxy.cc
  142. shill_proxy.h
  143. shill_proxy_interface.h
  144. sideload_main.cc
  145. system_state.h
  146. tar_bunzip2.gypi
  147. test_http_server.cc
  148. test_subprocess.cc
  149. testrunner.cc
  150. unittest_key.pem
  151. unittest_key2.pem
  152. update_attempter.cc
  153. update_attempter.h
  154. update_attempter_android.cc
  155. update_attempter_android.h
  156. update_attempter_unittest.cc
  157. update_engine-client.gyp
  158. update_engine.conf
  159. update_engine.gyp
  160. update_engine.rc
  161. update_engine_client.cc
  162. update_engine_client_android.cc
  163. update_metadata.proto
  164. update_status_utils.cc
  165. update_status_utils.h
  166. utils_android.cc
  167. utils_android.h