diff options
author | Joel Kitching <kitching@google.com> | 2019-08-27 17:13:55 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-31 20:49:16 +0000 |
commit | fbde3aa0af045021c2bfd315ad59f10aab2543fc (patch) | |
tree | abe4d0373a2a2b596f247a946aee5be51664ca0f /tests/vb20_misc_tests.c | |
parent | f4a9bfb303b034639469f1f1fcf18d61357bd4fe (diff) | |
download | vboot-fbde3aa0af045021c2bfd315ad59f10aab2543fc.tar.gz |
vboot/secdata: rename secdata and secdatak
For clarity's sake, rename:
secdata -> secdata_firmware
secdatak -> secdata_kernel
secdata is now the general term to refer to any secure data
spaces: firmware, kernel, and FWMP.
Once coreboot code has been updated, the sections in 2api.h
and 2constants.h may be removed.
BUG=b:124141368, chromium:972956
TEST=make clean && make runtests
BRANCH=none
Change-Id: I376acee552e8be37c75c340626a95462f81e198b
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1773079
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests/vb20_misc_tests.c')
-rw-r--r-- | tests/vb20_misc_tests.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/vb20_misc_tests.c b/tests/vb20_misc_tests.c index 1d23a6d6..cc592226 100644 --- a/tests/vb20_misc_tests.c +++ b/tests/vb20_misc_tests.c @@ -76,8 +76,8 @@ static void reset_common_data(enum reset_type t) vb2_nv_init(&ctx); - vb2api_secdata_create(&ctx); - vb2_secdata_init(&ctx); + vb2api_secdata_firmware_create(&ctx); + vb2_secdata_firmware_init(&ctx); mock_read_res_fail_on_call = 0; mock_unpack_key_retval = VB2_SUCCESS; @@ -86,7 +86,8 @@ static void reset_common_data(enum reset_type t) /* Set up mock data for verifying keyblock */ sd->fw_version_secdata = 0x20002; - vb2_secdata_set(&ctx, VB2_SECDATA_VERSIONS, sd->fw_version_secdata); + vb2_secdata_firmware_set(&ctx, VB2_SECDATA_FIRMWARE_VERSIONS, + sd->fw_version_secdata); gbb.rootkey_offset = vb2_offset_of(&mock_gbb, &mock_gbb.rootkey); gbb.rootkey_size = sizeof(mock_gbb.rootkey_data); @@ -366,7 +367,7 @@ static void verify_preamble_tests(void) pre->firmware_version = 3; TEST_SUCC(vb2_load_fw_preamble(&ctx), "preamble version roll forward"); - vb2_secdata_get(&ctx, VB2_SECDATA_VERSIONS, &v); + vb2_secdata_firmware_get(&ctx, VB2_SECDATA_FIRMWARE_VERSIONS, &v); TEST_EQ(v, 0x20003, "roll forward"); /* Newer version without result success doesn't roll forward */ @@ -375,7 +376,7 @@ static void verify_preamble_tests(void) sd->last_fw_result = VB2_FW_RESULT_UNKNOWN; TEST_SUCC(vb2_load_fw_preamble(&ctx), "preamble version no roll forward 1"); - vb2_secdata_get(&ctx, VB2_SECDATA_VERSIONS, &v); + vb2_secdata_firmware_get(&ctx, VB2_SECDATA_FIRMWARE_VERSIONS, &v); TEST_EQ(v, 0x20002, "no roll forward"); /* Newer version with success but for other slot doesn't roll forward */ @@ -384,7 +385,7 @@ static void verify_preamble_tests(void) sd->last_fw_slot = 1; TEST_SUCC(vb2_load_fw_preamble(&ctx), "preamble version no roll forward 2"); - vb2_secdata_get(&ctx, VB2_SECDATA_VERSIONS, &v); + vb2_secdata_firmware_get(&ctx, VB2_SECDATA_FIRMWARE_VERSIONS, &v); TEST_EQ(v, 0x20002, "no roll forward"); } |