@@ -11,6 +11,27 @@ use crate::{
1111 state:: ConnectionState ,
1212} ;
1313
14+ /// Generate a GET_MEASUREMENTS request
15+ ///
16+ /// # Arguments
17+ /// * `ctx`: The SPDM context
18+ /// * `req_buf`: Buffer to write the request into
19+ /// * `raw_bitstream_requested`: Request a raw bit stream (if supported) (SPDM v1.2+)
20+ /// * `new_measurement_requested`: Request new measurement if the responder has pending updates to blocks (SPDM v1.3+)
21+ /// * `meas_op`: Measurement operation
22+ /// (0x00: query total number of available blocks, 0x01-0xFE: query block, 0xFF: query all blocks)
23+ /// * `slot_id`: Request a signed measurement if provided, signed with certificate slot identifier (0-7)
24+ /// * `context`: Append optional 8 byte context (SPDM v1.3+)
25+ ///
26+ /// # Returns
27+ /// - () on success
28+ /// - [CommandError] on failure
29+ ///
30+ /// # Connection State Requirements
31+ /// - Connection state must be >= AlgorithmsNegotiated
32+ ///
33+ /// # Transcript
34+ /// - Appends request to the L1 transcript context
1435pub fn generate_get_measurements < ' a > (
1536 ctx : & mut SpdmContext < ' a > ,
1637 req_buf : & mut MessageBuf < ' a > ,
@@ -125,3 +146,12 @@ fn responder_supports_signed_measurements(ctx: &SpdmContext<'_>) -> bool {
125146 return false ;
126147 }
127148}
149+
150+ /// Handle an incoming MEASUREMENTS response
151+ pub ( crate ) fn handle_measurements_response < ' a > (
152+ ctx : & mut SpdmContext < ' a > ,
153+ resp_header : SpdmMsgHdr ,
154+ resp : & mut MessageBuf < ' a > ,
155+ ) -> CommandResult < ( ) > {
156+ todo ! ( )
157+ }
0 commit comments