mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 02:35:22 +00:00
Fix KeyBlockVerify() to take an explicit param for whether to use hash only.
Fix VerifyMemberInside(). BUG=chrome-os-partner:703 TEST=make && make runtests Review URL: http://codereview.chromium.org/3126013
This commit is contained in:
@@ -168,10 +168,6 @@ int LoadKernel(LoadKernelParams* params) {
|
||||
return (status == TPM_E_MUST_REBOOT ?
|
||||
LOAD_KERNEL_REBOOT : LOAD_KERNEL_RECOVERY);
|
||||
}
|
||||
} else if (is_dev && !is_rec) {
|
||||
/* In developer mode, we ignore the kernel subkey, and just use
|
||||
* the SHA-512 hash to verify the key block. */
|
||||
kernel_subkey = NULL;
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -215,9 +211,11 @@ int LoadKernel(LoadKernelParams* params) {
|
||||
if (0 != BootDeviceReadLBA(part_start, kbuf_sectors, kbuf))
|
||||
continue;
|
||||
|
||||
/* Verify the key block */
|
||||
/* Verify the key block. In developer mode, we ignore the key
|
||||
* and use only the SHA-512 hash to verify the key block. */
|
||||
key_block = (VbKeyBlockHeader*)kbuf;
|
||||
if ((0 != KeyBlockVerify(key_block, KBUF_SIZE, kernel_subkey))) {
|
||||
if ((0 != KeyBlockVerify(key_block, KBUF_SIZE, kernel_subkey,
|
||||
is_dev && !is_rec))) {
|
||||
VBDEBUG(("Verifying key block failed.\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user