Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

add ZeroizeOnDrop derive for vendor defined struct. #133

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spdmlib/src/message/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::error::{
SpdmResult, SpdmStatus, SPDM_STATUS_BUFFER_FULL, SPDM_STATUS_INVALID_STATE_LOCAL,
};
use codec::{enum_builder, Codec, Reader, Writer};

use conquer_once::spin::OnceCell;
use zeroize::ZeroizeOnDrop;

// config::MAX_SPDM_MSG_SIZE - 7 - 2
// SPDM0274 1.2.1: Table 56, table 57 VENDOR_DEFINED_RESPONSE message format
Expand Down Expand Up @@ -82,7 +82,7 @@ impl Codec for VendorIDStruct {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, ZeroizeOnDrop)]
pub struct VendorDefinedReqPayloadStruct {
pub req_length: u16,
pub vendor_defined_req_payload: [u8; MAX_SPDM_VENDOR_DEFINED_PAYLOAD_SIZE],
Expand Down Expand Up @@ -117,7 +117,7 @@ impl Codec for VendorDefinedReqPayloadStruct {
}
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, ZeroizeOnDrop)]
pub struct VendorDefinedRspPayloadStruct {
pub rsp_length: u16,
pub vendor_defined_rsp_payload: [u8; MAX_SPDM_VENDOR_DEFINED_PAYLOAD_SIZE],
Expand Down
Loading