Skip to content

Commit

Permalink
[manuf] verify DICE cert chain in perso flow
Browse files Browse the repository at this point in the history
This updatest the FT personalization flow to verify DICE cert chain, in
addition to verifying all SKU-specific host-endorsed certs. This fixes #24954.

Signed-off-by: Tim Trippel <[email protected]>
  • Loading branch information
timothytrippel committed Oct 31, 2024
1 parent e91ede7 commit 3932ccc
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 146 deletions.
8 changes: 7 additions & 1 deletion sw/device/silicon_creator/manuf/base/ft_personalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ static status_t personalize_gen_dice_certificates(ujson_t *uj) {
&otp_rot_creator_auth_codesign_measurement,
&otp_rot_creator_auth_state_measurement, &uds_key_ids, &curr_pubkey,
all_certs, &curr_cert_size));
// DO NOT CHANGE THE "UDS" STRING BELOW with modifying the `dice_cert_names`
// collection in sw/host/provisioning/ft_lib/src/lib.rs.
TRY(perso_tlv_prepare_cert_for_shipping("UDS", true, all_certs,
curr_cert_size, &perso_blob_to_host));

Expand All @@ -446,7 +448,9 @@ static status_t personalize_gen_dice_certificates(ujson_t *uj) {
&cdi_0_key_ids, &curr_pubkey, all_certs,
&curr_cert_size));
cdi_0_offset = perso_blob_to_host.next_free;
TRY(perso_tlv_prepare_cert_for_shipping("CDI_O", false, all_certs,
// DO NOT CHANGE THE "CDI_0" STRING BELOW with modifying the `dice_cert_names`
// collection in sw/host/provisioning/ft_lib/src/lib.rs.
TRY(perso_tlv_prepare_cert_for_shipping("CDI_0", false, all_certs,
curr_cert_size, &perso_blob_to_host));

// Generate CDI_1 keys and cert.
Expand All @@ -463,6 +467,8 @@ static status_t personalize_gen_dice_certificates(ujson_t *uj) {
certgen_inputs.owner_security_version, &cdi_1_key_ids, &curr_pubkey,
all_certs, &curr_cert_size));
cdi_1_offset = perso_blob_to_host.next_free;
// DO NOT CHANGE THE "CDI_1" STRING BELOW with modifying the `dice_cert_names`
// collection in sw/host/provisioning/ft_lib/src/lib.rs.
return perso_tlv_prepare_cert_for_shipping(
"CDI_1", false, all_certs, curr_cert_size, &perso_blob_to_host);
}
Expand Down
Loading

0 comments on commit 3932ccc

Please sign in to comment.