summaryrefslogtreecommitdiff
path: root/tests/futility/test_file_types.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-03-26 15:59:06 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-31 06:30:36 +0000
commitb5a439241fee558631d466cfa5203dd447504427 (patch)
tree523b6e169df13c71fbbb240d41253813b33aa726 /tests/futility/test_file_types.c
parent091c7b17f09f287da115ca247d39e7128158a581 (diff)
downloadvboot-b5a439241fee558631d466cfa5203dd447504427.tar.gz
futility: add support for usbpd1 images
The USB Type-C chargers released with Samus ("Pixel (2015)") have upgradable firmware. Those firmware images are currently signed by some custom scripts. This adds support for those images to futility, so that those custom scripts can be replaced. Note that due to space considerations, the usbpd firmware images don't have room for handy things like an FMAP or headers for the signatures. Accordingly, all the normally variable factors (image size, signature algorithms, etc.) are hard coded and the image itself just looks like a bunch of random numbers. Because of this: 1. There's no way to recognize this type of file, and nothing to display about it. 2. You have to give the "--type usbpd1" arg to the sign command. 3. I'm designating this file type "v1" because I hope that the firmware for any future adapters will be more readily identifiable. BUG=chromium:231574 BRANCH=none TEST=make runtests This adds a new test that signs usbpd1 firmware images using futility, and compares the result to the same files signed by the custom scripts, ensuring that they are bitwise identical. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Idbe061db5b3c8e474ada47b40bcbe04bbecdba3a Reviewed-on: https://chromium-review.googlesource.com/262899 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/futility/test_file_types.c')
-rw-r--r--tests/futility/test_file_types.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/futility/test_file_types.c b/tests/futility/test_file_types.c
index a2d03bf7..3fb21cc6 100644
--- a/tests/futility/test_file_types.c
+++ b/tests/futility/test_file_types.c
@@ -37,6 +37,7 @@ static struct {
{FILE_TYPE_VB2_PUBKEY, "tests/futility/data/sample.vbpubk2"},
{FILE_TYPE_VB2_PRIVKEY, "tests/futility/data/sample.vbprik2"},
{FILE_TYPE_PEM, "tests/testkeys/key_rsa2048.pem"},
+ {FILE_TYPE_USBPD1, },
};
BUILD_ASSERT(ARRAY_SIZE(test_case) == NUM_FILE_TYPES);