OLD | NEW |
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 // Utility for manipulating verified boot firmware images. | 5 // Utility for manipulating verified boot firmware images. |
6 // | 6 // |
7 | 7 |
8 #include "firmware_utility.h" | 8 #include "firmware_utility.h" |
9 | 9 |
10 #include <errno.h> | 10 #include <errno.h> |
11 #include <getopt.h> | 11 #include <getopt.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 #include <stdint.h> // Needed for UINT16_MAX. | 13 #include <stdint.h> // Needed for UINT16_MAX. |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <unistd.h> | 15 #include <unistd.h> |
16 | 16 |
17 #include <iostream> | 17 #include <iostream> |
18 | 18 |
19 extern "C" { | 19 extern "C" { |
| 20 #include "cryptolib.h" |
20 #include "file_keys.h" | 21 #include "file_keys.h" |
21 #include "firmware_image.h" | 22 #include "firmware_image.h" |
22 #include "padding.h" | |
23 #include "rsa_utility.h" | |
24 #include "sha_utility.h" | |
25 #include "utility.h" | 23 #include "utility.h" |
26 } | 24 } |
27 | 25 |
28 extern int errno; | 26 extern int errno; |
29 using std::cerr; | 27 using std::cerr; |
30 | 28 |
31 namespace vboot_reference { | 29 namespace vboot_reference { |
32 | 30 |
33 FirmwareUtility::FirmwareUtility(): | 31 FirmwareUtility::FirmwareUtility(): |
34 image_(NULL), | 32 image_(NULL), |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 304 } |
307 if (fu.is_verify()) { | 305 if (fu.is_verify()) { |
308 cerr << "Verification "; | 306 cerr << "Verification "; |
309 if (fu.VerifySignedImage()) | 307 if (fu.VerifySignedImage()) |
310 cerr << "SUCCESS.\n"; | 308 cerr << "SUCCESS.\n"; |
311 else | 309 else |
312 cerr << "FAILURE.\n"; | 310 cerr << "FAILURE.\n"; |
313 } | 311 } |
314 return 0; | 312 return 0; |
315 } | 313 } |
OLD | NEW |