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

change list of version to list of option. #173

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Conversation

longlongyang
Copy link
Contributor

fix #170

@jyao1
Copy link
Contributor

jyao1 commented Dec 12, 2023

question: Why we dont need to change key_exchange_req?

@longlongyang
Copy link
Contributor Author

question: Why we dont need to change key_exchange_req?

Because requester use pre-defined opaque array, other than constructing opaque with the secure version list in SpdmConfigInfo

let mut opaque;
if self.common.negotiate_info.spdm_version_sel < SpdmVersion::SpdmVersion12 {
opaque = SpdmOpaqueStruct {
data_size: crate::common::opaque::REQ_DMTF_OPAQUE_DATA_SUPPORT_VERSION_LIST_DSP0277
.len() as u16,
..Default::default()
};
opaque.data[..(opaque.data_size as usize)].copy_from_slice(
crate::common::opaque::REQ_DMTF_OPAQUE_DATA_SUPPORT_VERSION_LIST_DSP0277.as_ref(),
);
} else if self.common.negotiate_info.opaque_data_support
== SpdmOpaqueSupport::OPAQUE_DATA_FMT1
{
opaque = SpdmOpaqueStruct {
data_size:
crate::common::opaque::REQ_DMTF_OPAQUE_DATA_SUPPORT_VERSION_LIST_DSP0274_FMT1
.len() as u16,
..Default::default()
};
opaque.data[..(opaque.data_size as usize)].copy_from_slice(
crate::common::opaque::REQ_DMTF_OPAQUE_DATA_SUPPORT_VERSION_LIST_DSP0274_FMT1
.as_ref(),
);
} else {
return Err(SPDM_STATUS_UNSUPPORTED_CAP);
}

@longlongyang
Copy link
Contributor Author

REF: #177

@jyao1 jyao1 merged commit e14d45a into intel:main Dec 14, 2023
47 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

version list in SpdmConfigInfo should be list of Option.
2 participants