diff options
| -rw-r--r-- | delta_performer.cc | 2 | ||||
| -rw-r--r-- | delta_performer.h | 4 | ||||
| -rw-r--r-- | omaha_response_handler_action.cc | 7 | ||||
| -rw-r--r-- | platform_constants.h | 5 | ||||
| -rw-r--r-- | platform_constants_android.cc | 2 | ||||
| -rw-r--r-- | platform_constants_chromeos.cc | 2 |
6 files changed, 13 insertions, 9 deletions
diff --git a/delta_performer.cc b/delta_performer.cc index 0482a8f0..194f9341 100644 --- a/delta_performer.cc +++ b/delta_performer.cc @@ -60,8 +60,6 @@ const uint64_t DeltaPerformer::kDeltaManifestSizeSize = 8; const uint64_t DeltaPerformer::kSupportedMajorPayloadVersion = 1; const uint64_t DeltaPerformer::kSupportedMinorPayloadVersion = 2; -const char DeltaPerformer::kUpdatePayloadPublicKeyPath[] = - "/usr/share/update_engine/update-payload-key.pub.pem"; const unsigned DeltaPerformer::kProgressLogMaxChunks = 10; const unsigned DeltaPerformer::kProgressLogTimeoutSeconds = 30; const unsigned DeltaPerformer::kProgressDownloadWeight = 50; diff --git a/delta_performer.h b/delta_performer.h index d088796a..087c2adf 100644 --- a/delta_performer.h +++ b/delta_performer.h @@ -31,6 +31,7 @@ #include "update_engine/file_writer.h" #include "update_engine/install_plan.h" #include "update_engine/omaha_hash_calculator.h" +#include "update_engine/platform_constants.h" #include "update_engine/system_state.h" #include "update_engine/update_metadata.pb.h" @@ -53,7 +54,6 @@ class DeltaPerformer : public FileWriter { static const uint64_t kDeltaManifestSizeSize; static const uint64_t kSupportedMajorPayloadVersion; static const uint64_t kSupportedMinorPayloadVersion; - static const char kUpdatePayloadPublicKeyPath[]; // Defines the granularity of progress logging in terms of how many "completed // chunks" we want to report at the most. @@ -85,7 +85,7 @@ class DeltaPerformer : public FileWriter { buffer_offset_(0), last_updated_buffer_offset_(kuint64max), block_size_(0), - public_key_path_(kUpdatePayloadPublicKeyPath), + public_key_path_(constants::kUpdatePayloadPublicKeyPath), total_bytes_received_(0), num_rootfs_operations_(0), num_total_operations_(0), diff --git a/omaha_response_handler_action.cc b/omaha_response_handler_action.cc index dba3d74e..11536280 100644 --- a/omaha_response_handler_action.cc +++ b/omaha_response_handler_action.cc @@ -40,16 +40,13 @@ const char OmahaResponseHandlerAction::kDeadlineFile[] = OmahaResponseHandlerAction::OmahaResponseHandlerAction( SystemState* system_state) - : system_state_(system_state), - got_no_update_response_(false), - key_path_(DeltaPerformer::kUpdatePayloadPublicKeyPath), - deadline_file_(kDeadlineFile) {} + : OmahaResponseHandlerAction(system_state, kDeadlineFile) {} OmahaResponseHandlerAction::OmahaResponseHandlerAction( SystemState* system_state, const string& deadline_file) : system_state_(system_state), got_no_update_response_(false), - key_path_(DeltaPerformer::kUpdatePayloadPublicKeyPath), + key_path_(constants::kUpdatePayloadPublicKeyPath), deadline_file_(deadline_file) {} void OmahaResponseHandlerAction::PerformAction() { diff --git a/platform_constants.h b/platform_constants.h index 9f8778e1..0c832c97 100644 --- a/platform_constants.h +++ b/platform_constants.h @@ -33,6 +33,11 @@ extern const char kOmahaUpdaterID[]; // The name of the platform as sent to Omaha. extern const char kOmahaPlatformName[]; +// Path to the location of the public half of the payload key. The payload key +// is used to sign the contents of the payload binary file: the manifest and the +// whole payload. +extern const char kUpdatePayloadPublicKeyPath[]; + } // namespace constants } // namespace chromeos_update_engine diff --git a/platform_constants_android.cc b/platform_constants_android.cc index 55ec974c..be0329b1 100644 --- a/platform_constants_android.cc +++ b/platform_constants_android.cc @@ -25,6 +25,8 @@ const char kOmahaDefaultAUTestURL[] = "https://clients2.google.com/service/update2/brillo"; const char kOmahaUpdaterID[] = "Brillo"; const char kOmahaPlatformName[] = "Brillo"; +const char kUpdatePayloadPublicKeyPath[] = + "/etc/update_engine/update-payload-key.pub.pem"; } // namespace constants } // namespace chromeos_update_engine diff --git a/platform_constants_chromeos.cc b/platform_constants_chromeos.cc index 62c17209..2a6ce120 100644 --- a/platform_constants_chromeos.cc +++ b/platform_constants_chromeos.cc @@ -25,6 +25,8 @@ const char kOmahaDefaultAUTestURL[] = "https://omaha.sandbox.google.com/service/update2"; const char kOmahaUpdaterID[] = "ChromeOSUpdateEngine"; const char kOmahaPlatformName[] = "Chrome OS"; +const char kUpdatePayloadPublicKeyPath[] = + "/usr/share/update_engine/update-payload-key.pub.pem"; } // namespace constants } // namespace chromeos_update_engine |
