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 * Host-side functions for verified boot. | 5 * Host-side functions for verified boot. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef VBOOT_REFERENCE_HOST_COMMON_H_ | 8 #ifndef VBOOT_REFERENCE_HOST_COMMON_H_ |
9 #define VBOOT_REFERENCE_HOST_COMMON_H_ | 9 #define VBOOT_REFERENCE_HOST_COMMON_H_ |
10 | 10 |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include "cryptolib.h" | 13 #include "cryptolib.h" |
14 #include "host_key.h" | 14 #include "host_key.h" |
| 15 #include "host_misc.h" |
15 #include "host_signature.h" | 16 #include "host_signature.h" |
16 #include "utility.h" | 17 #include "utility.h" |
17 #include "vboot_struct.h" | 18 #include "vboot_struct.h" |
18 | 19 |
19 | 20 |
20 /* Create a key block header containing [data_key] and [flags], signed | 21 /* Create a key block header containing [data_key] and [flags], signed |
21 * by [signing_key]. Caller owns the returned pointer, and must free | 22 * by [signing_key]. Caller owns the returned pointer, and must free |
22 * it with Free(). */ | 23 * it with Free(). */ |
23 VbKeyBlockHeader* CreateKeyBlock(const VbPublicKey* data_key, | 24 VbKeyBlockHeader* CreateKeyBlock(const VbPublicKey* data_key, |
24 const VbPrivateKey* signing_key, | 25 const VbPrivateKey* signing_key, |
(...skipping 14 matching lines...) Expand all Loading... |
39 /* Creates a kernel preamble, signed with [signing_key]. | 40 /* Creates a kernel preamble, signed with [signing_key]. |
40 * Caller owns the returned pointer, and must free it with Free(). | 41 * Caller owns the returned pointer, and must free it with Free(). |
41 * | 42 * |
42 * Returns NULL if error. */ | 43 * Returns NULL if error. */ |
43 VbKernelPreambleHeader* CreateKernelPreamble( | 44 VbKernelPreambleHeader* CreateKernelPreamble( |
44 uint64_t kernel_version, | 45 uint64_t kernel_version, |
45 uint64_t body_load_address, | 46 uint64_t body_load_address, |
46 uint64_t bootloader_address, | 47 uint64_t bootloader_address, |
47 uint64_t bootloader_size, | 48 uint64_t bootloader_size, |
48 const VbSignature* body_signature, | 49 const VbSignature* body_signature, |
| 50 uint64_t desired_size, |
49 const VbPrivateKey* signing_key); | 51 const VbPrivateKey* signing_key); |
50 | 52 |
51 #endif /* VBOOT_REFERENCE_HOST_COMMON_H_ */ | 53 #endif /* VBOOT_REFERENCE_HOST_COMMON_H_ */ |
OLD | NEW |