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

Side by Side Diff: src/platform/vboot_reference/utility/include/kernel_utility.h

Issue 2372001: Add --subkey_in option to kernel signing utility. (Closed) Base URL: ssh://git@gitrw.chromium.org/chromiumos
Patch Set: . Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VBOOT_REFERENCE_KERNEL_UTILITY_H_ 5 #ifndef VBOOT_REFERENCE_KERNEL_UTILITY_H_
6 #define VBOOT_REFERENCE_KERNEL_UTILITY_H_ 6 #define VBOOT_REFERENCE_KERNEL_UTILITY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 extern "C" { 10 extern "C" {
11 #include "kernel_image.h" 11 #include "kernel_image.h"
12 } 12 }
13 13
14 struct RSAPublicKey; 14 struct RSAPublicKey;
15 15
16 namespace vboot_reference { 16 namespace vboot_reference {
17 17
18 // A class for handling verified boot kernel images. 18 // A class for handling verified boot kernel images.
19 class KernelUtility { 19 class KernelUtility {
20 public: 20 public:
21 KernelUtility(); 21 KernelUtility();
(...skipping 29 matching lines...) Expand all
51 // Check if all options were specified and sane. 51 // Check if all options were specified and sane.
52 // Return true on success, false on failure. 52 // Return true on success, false on failure.
53 bool CheckOptions(); 53 bool CheckOptions();
54 54
55 KernelImage* image_; 55 KernelImage* image_;
56 RSAPublicKey* firmware_key_pub_; // Root key used for verification. 56 RSAPublicKey* firmware_key_pub_; // Root key used for verification.
57 std::string firmware_key_file_; // Private key for signing the kernel key. 57 std::string firmware_key_file_; // Private key for signing the kernel key.
58 std::string firmware_key_pub_file_; 58 std::string firmware_key_pub_file_;
59 std::string kernel_key_file_; // Private key for signing the kernel. 59 std::string kernel_key_file_; // Private key for signing the kernel.
60 std::string kernel_key_pub_file_; 60 std::string kernel_key_pub_file_;
61 std::string subkey_in_file_; // Existing key signature header.
61 std::string config_file_; // File containing kernel commandline parameters 62 std::string config_file_; // File containing kernel commandline parameters
62 std::string bootloader_file_; // Embedded bootloader code 63 std::string bootloader_file_; // Embedded bootloader code
63 std::string vmlinuz_file_; // Input vmlinuz to be embedded in signed blob. 64 std::string vmlinuz_file_; // Input vmlinuz to be embedded in signed blob.
64 65
65 // Fields of a KernelImage. (read from the command line). 66 // Fields of a KernelImage. (read from the command line).
66 int header_version_; 67 int header_version_;
67 int firmware_sign_algorithm_; 68 int firmware_sign_algorithm_;
68 int kernel_sign_algorithm_; 69 int kernel_sign_algorithm_;
69 int kernel_key_version_; 70 int kernel_key_version_;
70 int kernel_version_; 71 int kernel_version_;
71 int padding_; 72 int padding_;
72 uint64_t kernel_len_; 73 uint64_t kernel_len_;
73 uint8_t* kernel_config_; 74 uint8_t* kernel_config_;
74 75
75 std::string in_file_; 76 std::string in_file_;
76 std::string out_file_; 77 std::string out_file_;
77 bool is_generate_; // Are we generating a new image? 78 bool is_generate_; // Are we generating a new image?
78 bool is_verify_; // Are we just verifying an already signed image? 79 bool is_verify_; // Are we just verifying an already signed image?
79 bool is_describe_; // Should we print out description of the image? 80 bool is_describe_; // Should we print out description of the image?
80 bool is_only_vblock_; // Should we just output the verification block? 81 bool is_only_vblock_; // Should we just output the verification block?
81 bool is_subkey_out_; // Should we just output the subkey header? 82 bool is_subkey_out_; // Should we just output the subkey header?
82 }; 83 };
83 84
84 } // namespace vboot_reference 85 } // namespace vboot_reference
85 86
86 #endif // VBOOT_REFERENCE_FIRMWARE_UTILITY_H_ 87 #endif // VBOOT_REFERENCE_FIRMWARE_UTILITY_H_
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utility/Makefile ('k') | src/platform/vboot_reference/utility/kernel_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698