mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
vboot: Add vb2_unpack_key_buffer
Previously, vb2_unpack_key() actually unpacked a key buffer. Callers
that had a vb2_packed_key had to typecast it back to a uint8_t buffer to
unpack it. Rename vb2_unpack_key() to vb2_unpack_key_buffer(), and make
vb2_unpack_key() unpack a vb2_packed_key.
BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge;
emerge-samus and boot it
Change-Id: I9ee38a819c59cc58a72ead78cf5ddf3d0f301ae7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400906
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
@@ -94,7 +94,7 @@ int vb2_load_fw_keyblock(struct vb2_context *ctx)
|
||||
return rv;
|
||||
|
||||
/* Unpack the root key */
|
||||
rv = vb2_unpack_key(&root_key, key_data, key_size);
|
||||
rv = vb2_unpack_key_buffer(&root_key, key_data, key_size);
|
||||
if (rv)
|
||||
return rv;
|
||||
|
||||
@@ -212,7 +212,7 @@ int vb2_load_fw_preamble(struct vb2_context *ctx)
|
||||
if (!sd->workbuf_data_key_size)
|
||||
return VB2_ERROR_FW_PREAMBLE2_DATA_KEY;
|
||||
|
||||
rv = vb2_unpack_key(&data_key, key_data, key_size);
|
||||
rv = vb2_unpack_key_buffer(&data_key, key_data, key_size);
|
||||
if (rv)
|
||||
return rv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user