From 0d5ad377138e5aa461d3300b0b9398e462c8289b Mon Sep 17 00:00:00 2001 From: Anthony Rocha Date: Thu, 12 Sep 2024 06:50:21 -0700 Subject: [PATCH] Include tcb_type string "RT_INFO" in the RtAlias certticate template --- .../caliptra_integration_tests/smoke_test.rs | 4 +-- .../smoke_testdata/rt_alias_cert_redacted.der | Bin 775 -> 784 bytes .../smoke_testdata/rt_alias_cert_redacted.txt | 2 +- x509/build/rt_alias_cert_tbs.rs | 25 +++++++++--------- x509/build/x509.rs | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/test/tests/caliptra_integration_tests/smoke_test.rs b/test/tests/caliptra_integration_tests/smoke_test.rs index 3760416549..576f4319c0 100644 --- a/test/tests/caliptra_integration_tests/smoke_test.rs +++ b/test/tests/caliptra_integration_tests/smoke_test.rs @@ -468,7 +468,7 @@ fn smoke_test() { .as_bytes() .to_vec(), },], - ty: None, + ty: Some(b"RT_INFO".to_vec()), ..Default::default() }), ); @@ -618,7 +618,7 @@ fn smoke_test() { .as_bytes() .to_vec(), },], - ty: None, + ty: Some(b"RT_INFO".to_vec()), ..Default::default() }), ); diff --git a/test/tests/caliptra_integration_tests/smoke_testdata/rt_alias_cert_redacted.der b/test/tests/caliptra_integration_tests/smoke_testdata/rt_alias_cert_redacted.der index ceedb22ec9ad2292a1b51e6f12191ae71f1c45cc..b9a2e8f33c3a0c4240f6f2369b26dd2543098c37 100644 GIT binary patch delta 59 zcmZo?o503z(8SDR(8M%(0W%XL6O+iqM3Ifkt&A+63>x20Uc>0dox#SI-pI Self { let mut template = Self { @@ -125,7 +126,7 @@ impl RtAliasCertTbs { fn apply(&mut self, params: &RtAliasCertTbsParams) { #[inline(always)] fn apply_slice( - buf: &mut [u8; 654usize], + buf: &mut [u8; 663usize], val: &[u8; LEN], ) { buf[OFFSET..OFFSET + LEN].copy_from_slice(val); diff --git a/x509/build/x509.rs b/x509/build/x509.rs index 71385942be..ba71ebdac1 100644 --- a/x509/build/x509.rs +++ b/x509/build/x509.rs @@ -371,7 +371,7 @@ pub fn make_rt_dice_tcb_info_ext(svn: u8, fwids: &[FwidParam]) -> X509Extension fwids: Some(asn1::SequenceOfWriter::new(&asn1_fwids)), flags: None, vendor_info: None, - tcb_type: None, + tcb_type: Some(b"RT_INFO"), flags_mask: None, };