diff options
author | Joel Kitching <kitching@google.com> | 2019-10-07 15:28:43 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-25 22:33:00 +0000 |
commit | 582453dd62a9616a95a19b42a36f6adb8988e329 (patch) | |
tree | 1b65180b07771eef688cac73b23dbc0dafe082a1 /futility/file_type_bios.c | |
parent | 80c1a85a87e589ed74962cad98f4892dbe6a3283 (diff) | |
download | vboot-582453dd62a9616a95a19b42a36f6adb8988e329.tar.gz |
vboot: fix up some host key functions for host_key2.cfactory-excelsior-12812.B
Deprecate:
PublicKeyInit --> vb2_init_packed_key
PublicKeyCopy --> vb2_copy_packed_key
Rename:
packed_key_looks_ok --> vb2_packed_key_looks_ok
Move vb2_packed_key_looks_ok from host_key.c to host_key2.c.
Move tests/vboot_common_tests.c to tests/vb2_host_key_tests.c.
Remove firmware/lib/vboot_common.c.
Remove host/lib/host_key.c.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Change-Id: I627b2af0416ac69460f9860614a69cad8bdb76a7
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1844597
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'futility/file_type_bios.c')
-rw-r--r-- | futility/file_type_bios.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/futility/file_type_bios.c b/futility/file_type_bios.c index 35a4f1dd..9d45269c 100644 --- a/futility/file_type_bios.c +++ b/futility/file_type_bios.c @@ -95,7 +95,7 @@ int ft_show_gbb(const char *name, uint8_t *buf, uint32_t len, void *data) struct vb2_packed_key *pubkey = (struct vb2_packed_key *)(buf + gbb->rootkey_offset); - if (packed_key_looks_ok(pubkey, gbb->rootkey_size)) { + if (vb2_packed_key_looks_ok(pubkey, gbb->rootkey_size) == VB2_SUCCESS) { if (state) { state->rootkey.offset = state->area[BIOS_FMAP_GBB].offset + @@ -112,7 +112,8 @@ int ft_show_gbb(const char *name, uint8_t *buf, uint32_t len, void *data) } pubkey = (struct vb2_packed_key *)(buf + gbb->recovery_key_offset); - if (packed_key_looks_ok(pubkey, gbb->recovery_key_size)) { + if (vb2_packed_key_looks_ok(pubkey, gbb->recovery_key_size) + == VB2_SUCCESS) { if (state) { state->recovery_key.offset = state->area[BIOS_FMAP_GBB].offset + @@ -264,9 +265,9 @@ static int fmap_sign_fw_preamble(const char *name, uint8_t *buf, uint32_t len, goto whatever; } - if (!packed_key_looks_ok(&keyblock->data_key, - keyblock->data_key.key_offset + - keyblock->data_key.key_size)) { + if (vb2_packed_key_looks_ok(&keyblock->data_key, + keyblock->data_key.key_offset + + keyblock->data_key.key_size)) { fprintf(stderr, "Warning: %s public key is invalid. " "Signing the entire FW FMAP region...\n", name); goto whatever; |