diff options
author | Jakub Czapiga <jacz@semihalf.com> | 2022-08-04 17:13:06 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-12 17:41:55 +0000 |
commit | 0ca7a9e4dad2e9780690524ced9273fa07052179 (patch) | |
tree | 9078489dc0f6e8e79aaf3ff80f2358b5dbc7e814 /futility/file_type_rwsig.c | |
parent | aaeb307f882d0c2e1284636e8423af1d216f6362 (diff) | |
download | vboot-0ca7a9e4dad2e9780690524ced9273fa07052179.tar.gz |
firmware: host: futility: Add CBFS metadata hash supportstabilize-15183.14.B
This patch adds support for signing and verification of coreboot images
supporting VBOOT_CBFS_INTEGRATION. Images with config option
CONFIG_VBOOT_CBFS_INTEGRATION=y will be signed with CBFS metadata hash
in signature. vb2api_get_metadata_hash() should be used to extract hash
value from VBLOCK and then should be used to verify CBFS metadata.
To support full verification, CBFS file data verification should also be
enabled and correctly handled.
BUG=b:197114807
TEST=build with CB:66909 and boot on volteer/voxel with
CONFIG_VBOOT_CBFS_INTEGRATION=y
BRANCH=none
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Change-Id: I4075c84820949be24c423ed14e291c89a0032863
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3811754
Commit-Queue: Julius Werner <jwerner@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'futility/file_type_rwsig.c')
-rw-r--r-- | futility/file_type_rwsig.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/futility/file_type_rwsig.c b/futility/file_type_rwsig.c index 86e9bf29..56d92c5f 100644 --- a/futility/file_type_rwsig.c +++ b/futility/file_type_rwsig.c @@ -32,14 +32,6 @@ #define SIGNATURE_RSVD_SIZE 1024 #define EC_RW_FILENAME "EC_RW.bin" -static inline void vb2_print_bytes(const void *ptr, uint32_t len) -{ - const uint8_t *buf = (const uint8_t *)ptr; - int i; - for (i = 0; i < len; i++) - printf("%02x", *buf++); -} - static void show_sig(const char *name, const struct vb21_signature *sig) { printf("Signature: %s\n", name); @@ -52,7 +44,7 @@ static void show_sig(const char *name, const struct vb21_signature *sig) printf(" Total size: %#x (%d)\n", sig->c.total_size, sig->c.total_size); printf(" ID: "); - vb2_print_bytes(&sig->id, sizeof(sig->id)); + print_bytes(&sig->id, sizeof(sig->id)); printf("\n"); printf(" Data size: %#x (%d)\n", sig->data_size, sig->data_size); |