Skip to content

Commit b2cbe5f

Browse files
committed
Reset M1/M2 transcript when a GET_MEASUREMENTS request is generated
1 parent 0e10400 commit b2cbe5f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/commands/measurements/request.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ use crate::{
4747
/// - Connection state must be >= AlgorithmsNegotiated
4848
///
4949
/// # Transcript
50+
/// - Resets M1/M2 message transcript
5051
/// - Appends request to the L1 transcript context
5152
pub fn generate_get_measurements<'a>(
5253
ctx: &mut SpdmContext<'a>,
@@ -148,6 +149,7 @@ pub fn generate_get_measurements<'a>(
148149
.push_data(payload_len)
149150
.map_err(|_| (false, CommandError::BufferTooSmall))?;
150151

152+
ctx.transcript_mgr.reset_context(TranscriptContext::M1);
151153
ctx.append_message_to_transcript(req_buf, TranscriptContext::L1)
152154
}
153155

0 commit comments

Comments
 (0)