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 * 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 /* Verifies [data] matches signature [sig] using [key]. */ | 61 /* Verifies [data] matches signature [sig] using [key]. */ |
62 int VerifyData(const uint8_t* data, const VbSignature* sig, | 62 int VerifyData(const uint8_t* data, const VbSignature* sig, |
63 const RSAPublicKey* key); | 63 const RSAPublicKey* key); |
64 | 64 |
65 | 65 |
66 /* Checks the sanity of a key block of size [size] bytes, using public | 66 /* Checks the sanity of a key block of size [size] bytes, using public |
67 * key [key]. If [key]==NULL, uses only the block checksum to verify | 67 * key [key]. If [key]==NULL, uses only the block checksum to verify |
68 * the key block. Header fields are also checked for sanity. Does not | 68 * the key block. Header fields are also checked for sanity. Does not |
69 * verify key index or key block flags. */ | 69 * verify key index or key block flags. */ |
70 int VerifyKeyBlock(const VbKeyBlockHeader* block, uint64_t size, | 70 int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size, |
71 const VbPublicKey *key); | 71 const VbPublicKey *key); |
72 | 72 |
73 | 73 |
74 /* Checks the sanity of a firmware preamble of size [size] bytes, | 74 /* Checks the sanity of a firmware preamble of size [size] bytes, |
75 * using public key [key]. | 75 * using public key [key]. |
76 * | 76 * |
77 * Returns VBOOT_SUCCESS if successful. */ | 77 * Returns VBOOT_SUCCESS if successful. */ |
78 int VerifyFirmwarePreamble2(const VbFirmwarePreambleHeader* preamble, | 78 int VerifyFirmwarePreamble2(const VbFirmwarePreambleHeader* preamble, |
79 uint64_t size, const RSAPublicKey* key); | 79 uint64_t size, const RSAPublicKey* key); |
80 | 80 |
81 | 81 |
82 /* Checks the sanity of a kernel preamble of size [size] bytes, | 82 /* Checks the sanity of a kernel preamble of size [size] bytes, |
83 * using public key [key]. | 83 * using public key [key]. |
84 * | 84 * |
85 * Returns VBOOT_SUCCESS if successful. */ | 85 * Returns VBOOT_SUCCESS if successful. */ |
86 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble, | 86 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble, |
87 uint64_t size, const RSAPublicKey* key); | 87 uint64_t size, const RSAPublicKey* key); |
88 | 88 |
89 | 89 |
90 | 90 |
91 | 91 |
92 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */ | 92 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */ |
OLD | NEW |