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

Side by Side Diff: vboot_firmware/lib/include/vboot_common.h

Issue 2848006: Refactor LoadFrmware() to avoid global variables, which don't work when running out of ROM (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Undo change to vboot_struct 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 | « vboot_firmware/include/load_firmware_fw.h ('k') | vboot_firmware/lib/include/vboot_firmware.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 * Common functions between firmware and kernel verified boot. 5 * Common functions between firmware and kernel verified boot.
6 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_VBOOT_COMMON_H_ 8 #ifndef VBOOT_REFERENCE_VBOOT_COMMON_H_
9 #define VBOOT_REFERENCE_VBOOT_COMMON_H_ 9 #define VBOOT_REFERENCE_VBOOT_COMMON_H_
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 uint64_t member_data_offset, 48 uint64_t member_data_offset,
49 uint64_t member_data_size); 49 uint64_t member_data_size);
50 50
51 int VerifyPublicKeyInside(const void* parent, uint64_t parent_size, 51 int VerifyPublicKeyInside(const void* parent, uint64_t parent_size,
52 const VbPublicKey* key); 52 const VbPublicKey* key);
53 53
54 int VerifySignatureInside(const void* parent, uint64_t parent_size, 54 int VerifySignatureInside(const void* parent, uint64_t parent_size,
55 const VbSignature* sig); 55 const VbSignature* sig);
56 56
57 57
58 /* Initialize a public key to refer to [key_data]. */
59 void PublicKeyInit(VbPublicKey* key, uint8_t* key_data, uint64_t key_size);
60
61
62 /* Copy a public key from [src] to [dest].
63 *
64 * Returns 0 if success, non-zero if error. */
65 int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src);
66
67
58 /* Converts a public key to RsaPublicKey format. The returned key must 68 /* Converts a public key to RsaPublicKey format. The returned key must
59 * be freed using RSAPublicKeyFree(). 69 * be freed using RSAPublicKeyFree().
60 * 70 *
61 * Returns NULL if error. */ 71 * Returns NULL if error. */
62 RSAPublicKey* PublicKeyToRSA(const VbPublicKey* key); 72 RSAPublicKey* PublicKeyToRSA(const VbPublicKey* key);
63 73
64 74
65 /* Verifies [data] matches signature [sig] using [key]. */ 75 /* Verifies [data] matches signature [sig] using [key]. */
66 int VerifyData(const uint8_t* data, const VbSignature* sig, 76 int VerifyData(const uint8_t* data, const VbSignature* sig,
67 const RSAPublicKey* key); 77 const RSAPublicKey* key);
(...skipping 25 matching lines...) Expand all
93 * using public key [key]. 103 * using public key [key].
94 * 104 *
95 * Returns VBOOT_SUCCESS if successful. */ 105 * Returns VBOOT_SUCCESS if successful. */
96 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble, 106 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble,
97 uint64_t size, const RSAPublicKey* key); 107 uint64_t size, const RSAPublicKey* key);
98 108
99 109
100 110
101 111
102 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */ 112 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */
OLDNEW
« no previous file with comments | « vboot_firmware/include/load_firmware_fw.h ('k') | vboot_firmware/lib/include/vboot_firmware.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698