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" | |
21 #include "file_keys.h" | 20 #include "file_keys.h" |
22 #include "kernel_image.h" | 21 #include "kernel_image.h" |
| 22 #include "padding.h" |
| 23 #include "rsa_utility.h" |
| 24 #include "sha_utility.h" |
23 #include "utility.h" | 25 #include "utility.h" |
24 } | 26 } |
25 | 27 |
26 extern int errno; | 28 extern int errno; |
27 using std::cerr; | 29 using std::cerr; |
28 | 30 |
29 namespace vboot_reference { | 31 namespace vboot_reference { |
30 | 32 |
31 KernelUtility::KernelUtility(): image_(NULL), | 33 KernelUtility::KernelUtility(): image_(NULL), |
32 firmware_key_pub_(NULL), | 34 firmware_key_pub_(NULL), |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 356 } |
355 else if (ku.is_verify()) { | 357 else if (ku.is_verify()) { |
356 cerr << "Verification "; | 358 cerr << "Verification "; |
357 if (ku.VerifySignedImage()) | 359 if (ku.VerifySignedImage()) |
358 cerr << "SUCCESS.\n"; | 360 cerr << "SUCCESS.\n"; |
359 else | 361 else |
360 cerr << "FAILURE.\n"; | 362 cerr << "FAILURE.\n"; |
361 } | 363 } |
362 return 0; | 364 return 0; |
363 } | 365 } |
OLD | NEW |