diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-10-23 09:48:20 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-28 20:39:31 +0000 |
commit | c8c2f023a4914a498c11b855210ef05d4e035d41 (patch) | |
tree | ec36ec0f2c163c5503e4a36da0618d9627a373a0 /tests/vb2_misc2_tests.c | |
parent | 4eef812d68f64cc501d795131d95f8a2f27223b1 (diff) | |
download | vboot-c8c2f023a4914a498c11b855210ef05d4e035d41.tar.gz |
vboot2: use enum signature algorithm
This changes the internals of vboot2 to use the enumerated type for
signature algorithm. The conversion from crypto algorithm is done
only when unpacking the key. This is preparation for the vboot2 data
types, which separate signature and hash algorithms into their own
fields.
There is no external change in the calling API to vboot, and no change
to the external data structures.
BUG=chromium:423882
BRANCH=none
TEST=VBOOT2=1 make runtests
Change-Id: I2e176d186d88cc7541644e001e720b4aee456be0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225209
Diffstat (limited to 'tests/vb2_misc2_tests.c')
-rw-r--r-- | tests/vb2_misc2_tests.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/vb2_misc2_tests.c b/tests/vb2_misc2_tests.c index 14526f70..05a379ee 100644 --- a/tests/vb2_misc2_tests.c +++ b/tests/vb2_misc2_tests.c @@ -218,9 +218,9 @@ static void verify_keyblock_tests(void) "keyblock read root key"); reset_common_data(FOR_KEYBLOCK); - mock_unpack_key_retval = VB2_ERROR_UNPACK_KEY_ALGORITHM; + mock_unpack_key_retval = VB2_ERROR_UNPACK_KEY_SIG_ALGORITHM; TEST_EQ(vb2_verify_fw_keyblock(&cc), - VB2_ERROR_UNPACK_KEY_ALGORITHM, + VB2_ERROR_UNPACK_KEY_SIG_ALGORITHM, "keyblock unpack root key"); reset_common_data(FOR_KEYBLOCK); @@ -295,9 +295,9 @@ static void verify_preamble_tests(void) "preamble no data key"); reset_common_data(FOR_PREAMBLE); - mock_unpack_key_retval = VB2_ERROR_UNPACK_KEY_ALGORITHM; + mock_unpack_key_retval = VB2_ERROR_UNPACK_KEY_HASH_ALGORITHM; TEST_EQ(vb2_verify_fw_preamble2(&cc), - VB2_ERROR_UNPACK_KEY_ALGORITHM, + VB2_ERROR_UNPACK_KEY_HASH_ALGORITHM, "preamble unpack data key"); reset_common_data(FOR_PREAMBLE); |