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

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

Issue 2234003: Change kernel vboot header layout and add support for separate header verification. (Closed) Base URL: ssh://git@gitrw.chromium.org/chromiumos
Patch Set: add verifykernelheader(). rename old function to verifykernelkeyheader(). 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" {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 config_file_; // File containing kernel config options.
62 // TODO(gauravsh): Currently this just fills in options.cmd_line in struct
63 // KernelImage (from vkernel/kernel_image_fw.h). Ideally we'd like to have
64 // a well defined config file format which is also backwards compatible with
65 // Legacy BIOS boot loaders.
66 61
67 // Fields of a KernelImage. (read from the command line). 62 // Fields of a KernelImage. (read from the command line).
68 int header_version_; 63 int header_version_;
69 int firmware_sign_algorithm_; 64 int firmware_sign_algorithm_;
70 int kernel_sign_algorithm_; 65 int kernel_sign_algorithm_;
71 int kernel_key_version_; 66 int kernel_key_version_;
72 int kernel_version_; 67 int kernel_version_;
73 uint64_t kernel_len_; 68 uint64_t kernel_len_;
74 uint8_t* kernel_config_; 69 uint8_t* kernel_config_;
75 70
76 std::string in_file_; 71 std::string in_file_;
77 std::string out_file_; 72 std::string out_file_;
78 bool is_generate_; // Are we generating a new image? 73 bool is_generate_; // Are we generating a new image?
79 bool is_verify_; // Are we just verifying an already signed image? 74 bool is_verify_; // Are we just verifying an already signed image?
80 bool is_describe_; // Should we print out description of the image? 75 bool is_describe_; // Should we print out description of the image?
81 bool is_only_vblock_; // Show we just output the verification block? 76 bool is_only_vblock_; // Show we just output the verification block?
82 }; 77 };
83 78
84 } // namespace vboot_reference 79 } // namespace vboot_reference
85 80
86 #endif // VBOOT_REFERENCE_FIRMWARE_UTILITY_H_ 81 #endif // VBOOT_REFERENCE_FIRMWARE_UTILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698