Open Zhiqiang520 opened 11 months ago
277 imposes more structure on SPDM 1.1 opaque data. If an endpoint supports 277 1.0 or 1.1 (ie, key exchange is supported), and if secured messages are enabled, then all OpaqueData
fields must conform to the "Secured Message opaque data format".
The Secured Message general opaque data table defines the general format for all opaque data fields. If the selected SPDM protocol version is 1.1, then all opaque data fields in SPDM messages shall utilize the format defined by Secured Message general opaque data.
Filed https://github.com/DMTF/SPDM-WG/issues/3302 for clarification on that.
The resolution to https://github.com/DMTF/SPDM-WG/issues/3302 is that the "Secured Message opaque data format" is only applicable during key exchange.
OpaqueData
format should be different between SPDM 1.1.2 and SPDM 1.2.1.In DSP0274_1.1.2.pdf. 1.1 Refer to the paragraph 256
Successful CHALLENGE_AUTH response message format
1.2 Refer to the paragraph 327Successful MEASUREMENTS response message format
In DSP0274_1.2.1.pdf. 2.1 Refer to the paragraph 353
Table 36 — Successful CHALLENGE_AUTH response message format
2.2 Refer to the paragraph 417Table 43 — Successful MEASUREMENTS response message format
But the code always generate the
OpaqueData
Free-form inlibspdm_challenge_opaque_data
,libspdm_encap_challenge_opaque_data
andlibspdm_measurement_opaque_data
, ignore the SPDM version and the selected opaque data format inOtherParamsSelection
. https://github.com/DMTF/libspdm/blob/955350eff19ff9cf2af29663b5407bb7e9cede57/os_stub/spdm_device_secret_lib_sample/lib.c#L1232-L1274 https://github.com/DMTF/libspdm/blob/955350eff19ff9cf2af29663b5407bb7e9cede57/os_stub/spdm_device_secret_lib_sample/lib.c#L1207-L1228