| 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 |
| 11 #include <stdint.h> | |
| 12 | |
| 13 #include "cryptolib.h" | 11 #include "cryptolib.h" |
| 14 #include "vboot_struct.h" | 12 #include "vboot_struct.h" |
| 15 | 13 |
| 16 /* Error Codes for all common functions. */ | 14 /* Error Codes for all common functions. */ |
| 17 enum { | 15 enum { |
| 18 VBOOT_SUCCESS = 0, | 16 VBOOT_SUCCESS = 0, |
| 19 VBOOT_KEY_BLOCK_INVALID, /* Key block internal structure is | 17 VBOOT_KEY_BLOCK_INVALID, /* Key block internal structure is |
| 20 * invalid, or not a key block */ | 18 * invalid, or not a key block */ |
| 21 VBOOT_KEY_BLOCK_SIGNATURE, /* Key block signature check failed */ | 19 VBOOT_KEY_BLOCK_SIGNATURE, /* Key block signature check failed */ |
| 22 VBOOT_KEY_BLOCK_HASH, /* Key block hash check failed */ | 20 VBOOT_KEY_BLOCK_HASH, /* Key block hash check failed */ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * using public key [key]. | 101 * using public key [key]. |
| 104 * | 102 * |
| 105 * Returns VBOOT_SUCCESS if successful. */ | 103 * Returns VBOOT_SUCCESS if successful. */ |
| 106 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble, | 104 int VerifyKernelPreamble2(const VbKernelPreambleHeader* preamble, |
| 107 uint64_t size, const RSAPublicKey* key); | 105 uint64_t size, const RSAPublicKey* key); |
| 108 | 106 |
| 109 | 107 |
| 110 | 108 |
| 111 | 109 |
| 112 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */ | 110 #endif /* VBOOT_REFERENCE_VBOOT_COMMON_H_ */ |
| OLD | NEW |