vboot2: misc higher-level routines, part 2

I'm breaking the last chunk of vboot2 into smaller pieces as I add
tests.  This has the higher-level routines for verifying keyblock and
preamble.

BUG=chromium:370082
BRANCH=none
TEST=make clean && VBOOT2=1 COV=1 make

Change-Id: I82da9542c8857a3f89a85f206c9f5aecadf94a79
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203501
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Randall Spangler
2014-06-11 16:01:08 -07:00
committed by chrome-internal-fetch
parent da2b49cf08
commit 1803068173
4 changed files with 612 additions and 0 deletions

View File

@@ -112,4 +112,24 @@ int vb2_check_tpm_clear(struct vb2_context *ctx);
*/
int vb2_select_fw_slot(struct vb2_context *ctx);
/**
* Verify the firmware keyblock using the root key.
*
* After this call, the data key is stored in the work buffer.
*
* @param ctx Vboot context
* @return VB2_SUCCESS, or error code on error.
*/
int vb2_verify_fw_keyblock(struct vb2_context *ctx);
/**
* Verify the firmware preamble using the data subkey from the keyblock.
*
* After this call, the preamble is stored in the work buffer.
*
* @param ctx Vboot context
* @return VB2_SUCCESS, or error code on error.
*/
int vb2_verify_fw_preamble2(struct vb2_context *ctx);
#endif /* VBOOT_REFERENCE_VBOOT_2MISC_H_ */