Skip to content

Commit 0b859cf

Browse files
timothytrippelpamaury
authored andcommitted
[perso] increase size of perso_blob_t UJSON struct to 5k
The perso blob buffer size was too small to hold all perso data with the addition of the WAS and Device ID. Signed-off-by: Tim Trippel <[email protected]> (cherry picked from commit 58289a2)
1 parent f4a8352 commit 0b859cf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sw/device/lib/testing/json/provisioning_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ UJSON_SERDE_STRUCT(ManufCertgenInputs, \
113113
#define STRUCT_PERSO_BLOB(field, string) \
114114
field(num_objs, size_t) \
115115
field(next_free, size_t) \
116-
field(body, uint8_t, 4096)
116+
field(body, uint8_t, 5120)
117117
UJSON_SERDE_STRUCT(PersoBlob, \
118118
perso_blob_t, \
119119
STRUCT_PERSO_BLOB);

sw/device/silicon_creator/manuf/extensions/default_ft_ext_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
use anyhow::Result;
66
use arrayvec::ArrayVec;
77

8-
pub fn ft_ext(endorsed_cert_concat: ArrayVec<u8, 4096>) -> Result<ArrayVec<u8, 4096>> {
8+
pub fn ft_ext(endorsed_cert_concat: ArrayVec<u8, 5120>) -> Result<ArrayVec<u8, 5120>> {
99
Ok(endorsed_cert_concat)
1010
}

sw/host/provisioning/ft_lib/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn get_cert(data: &[u8]) -> Result<CertHeader<'_>> {
290290
fn push_endorsed_cert(
291291
cert: &Vec<u8>,
292292
ref_cert: &CertHeader,
293-
output: &mut ArrayVec<u8, 4096>,
293+
output: &mut ArrayVec<u8, 5120>,
294294
) -> Result<()> {
295295
// Need to wrap the new cert in CertHeader
296296
let total_size = std::mem::size_of::<ObjHeaderType>()
@@ -367,7 +367,7 @@ fn provision_certificates(
367367
let mut dice_cert_chain_cwt: Vec<EndorsedCert> = Vec::new();
368368
let mut sku_specific_certs: Vec<EndorsedCert> = Vec::new();
369369
let mut num_host_endorsed_certs = 0;
370-
let mut endorsed_cert_concat = ArrayVec::<u8, 4096>::new();
370+
let mut endorsed_cert_concat = ArrayVec::<u8, 5120>::new();
371371
let mut device_was_hmac: Vec<u8> = Vec::new();
372372
let mut device_id: Vec<u8> = Vec::new();
373373
let mut host_was_hmac = Hmac::<Sha256>::new_from_slice(wafer_auth_secret.as_slice())?;

0 commit comments

Comments
 (0)