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

Side by Side Diff: payload_signer.h

Issue 3173032: AU: Payload Signer class (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: git pull Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « SConstruct ('k') | payload_signer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PAYLOAD_SIGNER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PAYLOAD_SIGNER_H__
7
8 #include <string>
9 #include <vector>
10 #include "base/basictypes.h"
11
12 // This function signs a payload with the OS vendor's private key.
13 // It takes an update up to the signature blob and returns the signature
14 // blob, which should be appended. See update_metadata.proto for more info.
15
16 namespace chromeos_update_engine {
17
18 extern const uint32_t kSignatureMessageVersion;
19
20 class PayloadSigner {
21 public:
22 static bool SignPayload(const std::string& unsigned_payload_path,
23 const std::string& private_key_path,
24 std::vector<char>* out_signature_blob);
25
26 // Returns the length of out_signature_blob that will result in a call
27 // to SignPayload with a given private key. Returns true on success.
28 static bool SignatureBlobLength(const std::string& private_key_path,
29 uint64_t* out_length);
30
31 private:
32 // This should never be constructed
33 DISALLOW_IMPLICIT_CONSTRUCTORS(PayloadSigner);
34 };
35
36 } // namespace chromeos_update_engine
37
38 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PAYLOAD_SIGNER_H__
OLDNEW
« no previous file with comments | « SConstruct ('k') | payload_signer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698