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
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 @@
/**
* 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");