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

Side by Side Diff: host/include/host_common.h

Issue 2729021: Clean up of key block functions (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: More key block cleanup 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
« no previous file with comments | « host/Makefile ('k') | host/include/host_keyblock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * 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_keyblock.h"
15 #include "host_misc.h" 16 #include "host_misc.h"
16 #include "host_signature.h" 17 #include "host_signature.h"
17 #include "utility.h" 18 #include "utility.h"
18 #include "vboot_struct.h" 19 #include "vboot_struct.h"
19 20
20 21
21 /* Create a key block header containing [data_key] and [flags], signed
22 * by [signing_key]. Caller owns the returned pointer, and must free
23 * it with Free(). */
24 VbKeyBlockHeader* CreateKeyBlock(const VbPublicKey* data_key,
25 const VbPrivateKey* signing_key,
26 uint64_t flags);
27
28
29 /* Creates a firmware preamble, signed with [signing_key]. 22 /* Creates a firmware preamble, signed with [signing_key].
30 * Caller owns the returned pointer, and must free it with Free(). 23 * Caller owns the returned pointer, and must free it with Free().
31 * 24 *
32 * Returns NULL if error. */ 25 * Returns NULL if error. */
33 VbFirmwarePreambleHeader* CreateFirmwarePreamble( 26 VbFirmwarePreambleHeader* CreateFirmwarePreamble(
34 uint64_t firmware_version, 27 uint64_t firmware_version,
35 const VbPublicKey* kernel_subkey, 28 const VbPublicKey* kernel_subkey,
36 const VbSignature* body_signature, 29 const VbSignature* body_signature,
37 const VbPrivateKey* signing_key); 30 const VbPrivateKey* signing_key);
38 31
39 32
40 /* Creates a kernel preamble, signed with [signing_key]. 33 /* Creates a kernel preamble, signed with [signing_key].
41 * Caller owns the returned pointer, and must free it with Free(). 34 * Caller owns the returned pointer, and must free it with Free().
42 * 35 *
43 * Returns NULL if error. */ 36 * Returns NULL if error. */
44 VbKernelPreambleHeader* CreateKernelPreamble( 37 VbKernelPreambleHeader* CreateKernelPreamble(
45 uint64_t kernel_version, 38 uint64_t kernel_version,
46 uint64_t body_load_address, 39 uint64_t body_load_address,
47 uint64_t bootloader_address, 40 uint64_t bootloader_address,
48 uint64_t bootloader_size, 41 uint64_t bootloader_size,
49 const VbSignature* body_signature, 42 const VbSignature* body_signature,
50 uint64_t desired_size, 43 uint64_t desired_size,
51 const VbPrivateKey* signing_key); 44 const VbPrivateKey* signing_key);
52 45
53 #endif /* VBOOT_REFERENCE_HOST_COMMON_H_ */ 46 #endif /* VBOOT_REFERENCE_HOST_COMMON_H_ */
OLDNEW
« no previous file with comments | « host/Makefile ('k') | host/include/host_keyblock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698