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 kernel images. | 5 // Utility for manipulating verified boot kernel images. |
6 // | 6 // |
7 | 7 |
8 #include "kernel_utility.h" | 8 #include "kernel_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 "kernel_image.h" | 22 #include "kernel_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 KernelUtility::KernelUtility(): image_(NULL), | 31 KernelUtility::KernelUtility(): image_(NULL), |
34 firmware_key_pub_(NULL), | 32 firmware_key_pub_(NULL), |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 } | 354 } |
357 else if (ku.is_verify()) { | 355 else if (ku.is_verify()) { |
358 cerr << "Verification "; | 356 cerr << "Verification "; |
359 if (ku.VerifySignedImage()) | 357 if (ku.VerifySignedImage()) |
360 cerr << "SUCCESS.\n"; | 358 cerr << "SUCCESS.\n"; |
361 else | 359 else |
362 cerr << "FAILURE.\n"; | 360 cerr << "FAILURE.\n"; |
363 } | 361 } |
364 return 0; | 362 return 0; |
365 } | 363 } |
OLD | NEW |