diff options
author | Hasini Gunasinghe <hasinitg@google.com> | 2022-03-14 19:29:12 +0000 |
---|---|---|
committer | Hasini Gunasinghe <hasinitg@google.com> | 2022-03-18 00:41:57 +0000 |
commit | a4d2e0908814b9c1d98541ebafb8795498101dcf (patch) | |
tree | a0282dca455ce93d8dbe4145ca2c719e9db7e88d | |
parent | 8f6ffbabcb8330aa5a860533dd5df38eed2d693b (diff) | |
download | trusty-a4d2e0908814b9c1d98541ebafb8795498101dcf.tar.gz |
Update the test-runner to cater the removal of BCC from DICE artifacts.
Due to privacy reasons, BCC is removed from the DICE artifacts
handed over to the non-secure world (i.e. ABL).
Tests are updated accordingly.
Bug: 220375452
Test: test-runner
Change-Id: I4abac11796142513ac7805838cf5a326dc900d6a
-rw-r--r-- | test-runner/test-runner.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test-runner/test-runner.c b/test-runner/test-runner.c index cb3209f..25e6268 100644 --- a/test-runner/test-runner.c +++ b/test-runner/test-runner.c @@ -172,25 +172,21 @@ void boot(int cpu) { /** * dice_artifacts expects the following CBOR encoded structure. + * Since the implementation of hwbcc_get_dice_artifacts serves only the + * non-secure world, Bcc is not present in the returned dice_artifacts. * We calculate the expected size, including CBOR header sizes. * BccHandover = { * 1 : bstr .size 32, // CDI_Attest * 2 : bstr .size 32, // CDI_Seal - * 3 : Bcc, // Cert_Chain + * ? 3 : Bcc, // Cert_Chain * } * Bcc = [ * PubKeyEd25519, // UDS (Unique Device Secret) * + BccEntry, // Root -> leaf * ] */ - size_t UDS_encoded_size = 45; - size_t bcc_entry_encoded_size = 463; - size_t bcc_encoded_size = - UDS_encoded_size + bcc_entry_encoded_size + 1 /*array header*/; size_t DICE_CDI_SIZE = 32; - size_t bcc_handover_size = - 2 * DICE_CDI_SIZE + bcc_encoded_size + - 8 /*map header, map keys and two 32 bytes indicators*/; + size_t bcc_handover_size = 2 * DICE_CDI_SIZE + 7 /*CBOR tags*/; if (resp_payload_size != bcc_handover_size) { log_msg("hwbcc_get_dice_artifacts failed with incorrect response size.\n"); |