pub(crate) fn add_snp_id_block_temp_key(
igvm_data: &[u8],
guest_svn: u32,
identity: SnpImageIdentity,
) -> Result<Vec<u8>>Expand description
Add an SNP ID block signed by an ephemeral key (development/test only).
The SNP launch digest is taken from the measurement that
[IgvmSerializer::new] computes eagerly, so the file is measured exactly
once. A random ECDSA P-384 key signs the block in-process. Production flows
should instead use add_snp_id_block_signed with an out-of-band
signature.
§Arguments
igvm_data- Input IGVM file; must contain an SEV-SNP platform header and a matching [IgvmInitializationHeader::GuestPolicy].guest_svn- Guest security version number to embed.identity- Family and image identifiers to embed.
§Errors
Returns an error if the file has no SEV-SNP platform, already contains an SNP ID block, lacks an SNP measurement/guest policy, or if signing fails.