libspdm Common API (DRAFT)
December 22, 2025 ยท View on GitHub
Introduction
This document details the public API available to Integrators when constructing an SPDM Requester or Responder using libspdm.
SPDM Context
libspdm's spdm_context stores information about an SPDM endpoint and its connection with another
SPDM endpoint. An Integrator must first populate the spdm_context to specify and configure the
endpoint's capabilities. This includes information such as
- The endpoint's SPDM capabilities such
PSK_CAPorKEY_EX_CAP. - The endpoint's cryptography algorithms such as
RSASSA_2048orECC_NIST_P256.
libspdm_set_data
Description
Populates an element of the spdm_context with the specified value.
Parameters
spdm_context
The SPDM context.
data_type
An enumeration value that specifies what element of the spdm_context to modify.
parameter
data
A pointer to the data that is to be inserted into the spdm_context.
data_size
The size, in bytes, of the data that is to be inserted into the spdm_context.
Details
TBD
libspdm_get_data
Description
Retrieves an element from the spdm_context.
Parameters
spdm_context
The SPDM context.
data_type
An enumeration value that specifies what element of the spdm_context to retrieve.
parameter
data
A pointer to the data that is to be retrieved from the spdm_context.
data_size
On input, the size, in bytes, of the buffer to store the data.
On output, the size, in bytes, of the data.
Details
TBD
libspdm_data_type_t
Description
Enumeration value used for the libspdm_set_data and/or libspdm_get_data functions.
Values that can be both get and set.
LIBSPDM_DATA_SPDM_VERSION- The SPDM (DSP0274) version(s) (1.0, 1.1, 1.2, or 1.3) of an endpoint. These are communicated
through the
GET_VERSION / VERSIONmessages. LIBSPDM_DATA_LOCATION_CONNECTION- The SPDM version of the peer endpoint.
- Cannot contain multiple entries.
LIBSPDM_DATA_LOCATION_LOCAL- The SPDM version(s) of the local endpoint.
- Can contain multiple entries.
- The SPDM (DSP0274) version(s) (1.0, 1.1, 1.2, or 1.3) of an endpoint. These are communicated
through the
LIBSPDM_DATA_CAPABILITY_FLAGS- The SPDM capabilities of an endpoint. These are communicated through the
GET_CAPABILITIES / CAPABILITIESmessages. This is a bitmask whose fields are defined through theSPDM_GET_CAPABILITIES_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The capabilities of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The capabilities of the local endpoint.
- The SPDM capabilities of an endpoint. These are communicated through the
LIBSPDM_DATA_CAPABILITY_CT_EXPONENTCTExponentis used to calculate the maximum amount of time (CT) an endpoint needs to provide a response to messages that require cryptographic processing, such asCHALLENGE / CHALLENGE_AUTH. The value ofCTis calculated as2^CTExponentand has units of microseconds. ThoughCTExponentcan range from 0 to 255, libspdm imposes a maximum value ofLIBSPDM_MAX_CT_EXPONENT.LIBSPDM_DATA_LOCATION_CONNECTION- The
CTExponentvalue of the peer endpoint.
- The
LIBSPDM_DATA_LOCATION_LOCAL- The
CTExponentvalue of the local endpoint.
- The
LIBSPDM_DATA_CAPABILITY_RTT_US- The SPDM specification defines this value (
RTT) as "the worst-case round-trip transport timing." and is in units of microseconds. This value is only used by a Requester and is used in the following scenarios.- It is the value of the
timeoutargument inlibspdm_device_send_message_func. When sending a message this is a worst-case value, and the implementer of the function is free to reduce the timeout value based on knowledge of the underlying transport. - It is added to the Responder's
CTorST1value and passed via thetimeoutargument inlibspdm_device_receive_message_func.
- It is the value of the
LIBSPDM_DATA_LOCATION_LOCAL- The
RTTvalue as measured by the Requester endpoint.
- The
- The SPDM specification defines this value (
LIBSPDM_DATA_MEASUREMENT_SPEC- This value specifies the measurement specification(s) supported by an endpoint. These are are
communicated through the
NEGOTIATE_ALGORITHMS / ALGORITHMSmessages. However the SPDM specification defines only one value,DMTFmeasSpec. If a Requester is not going to retrieve measurements from a Responder this can be0. This is a bitmask whose fields are defined through theSPDM_MEASUREMENT_SPECIFICATION_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The measurement specification of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The measurement specification of the local endpoint.
- This value specifies the measurement specification(s) supported by an endpoint. These are are
communicated through the
LIBSPDM_DATA_MEASUREMENT_HASH_ALGO- The algorithm used to hash a Responder's measurements. This is communicated through the
ALGORITHMSmessage. This is a bitmask whose fields are defined through theSPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_*macros. A value ofSPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_RAW_BIT_STREAM_ONLYindicates that the Responder cannot provide a hash for any measurement and provides the measurement directly. LIBSPDM_DATA_LOCATION_CONNECTION- The measurement hash algorithm of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The measurement hash algorithm of the local endpoint.
- The algorithm used to hash a Responder's measurements. This is communicated through the
LIBSPDM_DATA_BASE_ASYM_ALGO- The asymmetric cryptography algorithm used by the Responder to sign messages. This is a
bitmask whose fields are defined through the
SPDM_ALGORITHMS_BASE_ASYM_ALGO_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The asymmetric cryptography algorithm of the peer endpoint. -
LIBSPDM_DATA_LOCATION_LOCAL- The asymmetric cryptography algorithm(s) of the local endpoint.
- The asymmetric cryptography algorithm used by the Responder to sign messages. This is a
bitmask whose fields are defined through the
LIBSPDM_DATA_BASE_HASH_ALGO- The hash algorithm used to hash transcripts. This is a bitmask whose fields are defined
through the
SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The hash algorithm of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The hash algorithm(s) of the local endpoint.
- The hash algorithm used to hash transcripts. This is a bitmask whose fields are defined
through the
LIBSPDM_DATA_DHE_NAME_GROUP- The Diffie-Hellman scheme used for key exchange. This is a bitmask whose fields are defined
through the
SPDM_ALGORITHMS_DHE_NAMED_GROUP_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The Diffie-Hellman scheme of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The Diffie-Hellman scheme(s) of the local endpoint.
- The Diffie-Hellman scheme used for key exchange. This is a bitmask whose fields are defined
through the
LIBSPDM_DATA_AEAD_CIPHER_SUITE- The "authenticated encryption with associated data" algorithm used for symmetric cryptography.
This is a bitmask whose fields are defined through the
SPDM_ALGORITHMS_AEAD_CIPHER_SUITE_*macros LIBSPDM_DATA_LOCATION_CONNECTION- The AEAD algorithm of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The AEAD algorithms(s) of the local endpoint.
- The "authenticated encryption with associated data" algorithm used for symmetric cryptography.
This is a bitmask whose fields are defined through the
LIBSPDM_DATA_REQ_BASE_ASYM_ALG- The asymmetric algorithm used by the Requester to sign messages. This is a bitmask whose
fields are defined through the
SPDM_ALGORITHMS_BASE_ASYM_ALGO_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The asymmetric cryptography algorithm of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The asymmetric cryptography algorithm(s) of the local endpoint.
- The asymmetric algorithm used by the Requester to sign messages. This is a bitmask whose
fields are defined through the
LIBSPDM_DATA_KEY_SCHEDULE- The key schedule used for both symmetric and asymmetric key exchange. This is communicated
through the
NEGOTIATE_ALGORITHMS / ALGORITHMSmessages. This is a bitmask whose fields are defined through theSPDM_ALGORITHMS_KEY_SCHEDULE_*macros. LIBSPDM_DATA_LOCATION_CONNECTION- The key schedule of the peer endpoint.
LIBSPDM_DATA_LOCATION_LOCAL- The key schedule of the local endpoint.
- The key schedule used for both symmetric and asymmetric key exchange. This is communicated
through the
LIBSPDM_DATA_OTHER_PARAMS_SUPPORT- This field is included in the
NEGOTIATE_ALGORITHMS / ALGORITHMSmessages to advertise miscellaneous capabilities. This is a bitmask whose fields are defined through theSPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_*andSPDM_ALGORITHMS_MULTI_KEY_CONNmacros.SPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_0- The format for all
OpaqueDatafields is defined by the device vendor or other standards body.
- The format for all
SPDM_ALGORITHMS_OPAQUE_DATA_FORMAT_1- The format for all
OpaqueDatafields is defined by the SPDM specification's general opaque data format. For libspdm this format is required during key exchange to negotiate the version of the secured message binding specification.
- The format for all
SPDM_ALGORITHMS_MULTI_KEY_CONN- Specifies whether the Integrator wants the peer endpoint to support multi-key or not.
This only applies when the value of the peer endpoint's
MULTI_KEY_CAPisSPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MULTI_KEY_CAP_NEG. If the value of the peer endpoint'sMULTI_KEY_CAPis not that then libspdm will set the appropriate value inNEGOTIATE_ALGORITHMS / ALGORITHMSbased on the peer endpoint's capabilities.LIBSPDM_DATA_MULTI_KEY_CONN_REQandLIBSPDM_DATA_MULTI_KEY_CONN_RSPcan be queried after a successfulNEGOTIATE_ALGORITHMS / ALGORITHMSto determine the connection's multi-key state.
- Specifies whether the Integrator wants the peer endpoint to support multi-key or not.
This only applies when the value of the peer endpoint's
LIBSPDM_DATA_LOCATION_CONNECTION- The
OtherParamsvalue of the peer endpoint.
- The
LIBSPDM_DATA_LOCATION_LOCAL- The
OtherParamsvalue of the local endpoint.
- The
- This field is included in the
LIBSPDM_DATA_CONNECTION_STATE- The connection state of the two endpoints. Since the two endpoints share the same connection
state the
LIBSPDM_DATA_LOCATION_*value is not checked. Its value is one ofLIBSPDM_CONNECTION_STATE_NOT_STARTED- The initial state after the SPDM context has been initialized or reset.
LIBSPDM_CONNECTION_STATE_AFTER_VERSION- The state immediately after a successful
GET_VERSIONrequest andVERSIONresponse.
- The state immediately after a successful
LIBSPDM_CONNECTION_STATE_AFTER_CAPABILITIES- The state immediately after a successful
GET_CAPABILITIESrequest andCAPABILITIESresponse.
- The state immediately after a successful
LIBSPDM_CONNECTION_STATE_NEGOTIATED- The state immediately after a successful
NEGOTIATE_ALGORITHMSrequest andALGORITHMSresponse.
- The state immediately after a successful
LIBSPDM_CONNECTION_STATE_AFTER_DIGESTS- The state immediately after a successful
GET_DIGESTSrequest andDIGESTSresponse.
- The state immediately after a successful
LIBSPDM_CONNECTION_STATE_AFTER_CERTIFICATE- The state immediately after a successful
GET_CERTIFICATErequest andCERTIFICATEresponse.
- The state immediately after a successful
LIBSPDM_CONNECTION_STATE_AUTHENTICATED- The state immediately after a successful
CHALLENGErequest andCHALLENGE_AUTHresponse.
- The state immediately after a successful
- The connection state of the two endpoints. Since the two endpoints share the same connection
state the
LIBSPDM_DATA_PEER_PUBLIC_ROOT_CERT- Allows multiple pointers to root certificates to be stored in the
spdm_context. These root certificates are then either compared against the root certificate returned by a peer endpoint, or appended to the partial (without root certificate) certificate chain returned by a peer endpoint. The root certificate(s) must be encoded as ASN.1 DER.
- Allows multiple pointers to root certificates to be stored in the
LIBSPDM_DATA_LOCAL_PUBLIC_CERT_CHAIN- Allows multiple pointers to SPDM certificate chains to be stored in slots through the
additional_datafield. An SPDM certificate chain can then be returned through aCERTIFICATEresponse message. The structure of the SPDM certificate chain is defined in thespdm_cert_chain_tstruct in thespdm.hheader.
- Allows multiple pointers to SPDM certificate chains to be stored in slots through the
LIBSPDM_DATA_PEER_USED_CERT_CHAIN_BUFFER- Allows multiple certificates, or values derived from the certificates, to be stored in the
spdm_context. IfLIBSPDM_RECORD_TRANSCRIPT_DATA_SUPPORTis1then the provided certificate chain is copied into thespdm_context. IfLIBSPDM_RECORD_TRANSCRIPT_DATA_SUPPORTis0then the provided certificate chain is hashed and the public key of the leaf certificate is extracted.
- Allows multiple certificates, or values derived from the certificates, to be stored in the
LIBSPDM_DATA_PEER_PUBLIC_KEY- The raw public key of a peer endpoint. This is used when an endpoint does not support certificate chains and instead a public key is provisioned to its peer(s). While the SPDM specification does not mandate the format of the public key, libspdm implements the public key as described in RFC7250. It is ASN.1 DER-encoded.
LIBSPDM_DATA_LOCAL_PUBLIC_KEY- The raw public key of the local endpoint.
LIBSPDM_DATA_REQUEST_RETRY_TIMES- Specifies the number of times a Requester will retry a request message if the Responder
returns a
Busyerror response.
- Specifies the number of times a Requester will retry a request message if the Responder
returns a
LIBSPDM_DATA_REQUEST_RETRY_DELAY_TIME- Specifies the amount of time to wait before resending a request due to a
Busyerror response from the Responder.
- Specifies the amount of time to wait before resending a request due to a
LIBSPDM_DATA_MAX_DHE_SESSION_COUNT- Specifies the maximum number of secure sessions spawned through asymmetric key exchange.
LIBSPDM_DATA_MAX_PSK_SESSION_COUNT- Specifies the maximum number of secure sessions spawned through symmetric key exchange.
LIBSPDM_DATA_HANDLE_ERROR_RETURN_POLICY- Specifies how some errors are handled. It is a bitmask whose fields are defined by the
LIBSPDM_DATA_HANDLE_ERROR_RETURN_POLICY_*macros. LIBSPDM_DATA_HANDLE_ERROR_RETURN_POLICY_DROP_ON_DECRYPT_ERROR- If set then, if the Responder is unable to verify the MAC of an AEAD message, it will not
provide an
ERRORresponse to the Requester. If not set then the Responder will provide aDecryptErrorresponse to the Requester.
- If set then, if the Responder is unable to verify the MAC of an AEAD message, it will not
provide an
- Specifies how some errors are handled. It is a bitmask whose fields are defined by the
LIBSPDM_DATA_VCA_CACHE- A buffer that contains the appended
VCAmessages. It can be used to restore connections if the endpoints supportCACHE_CAP.
- A buffer that contains the appended
LIBSPDM_DATA_IS_REQUESTER- Specifies if the local endpoint is a Requester (true) or Responder (false).
LIBSPDM_DATA_APP_CONTEXT_DATA- Is used to hold a pointer to Integrator-defined data that is tied to the
spdm_context. Via this mechanism an Integrator can extend thespdm_context.
- Is used to hold a pointer to Integrator-defined data that is tied to the
LIBSPDM_DATA_HEARTBEAT_PERIOD- Specifies the Responder's
HeartbeatPeriodin units of seconds. This value is communicated to the Requester in theKEY_EXCHANGE_RSPandPSK_EXCHANGE_RSPmessages. The actual timeout limit is twice theHeartbeatPeriod.
- Specifies the Responder's
LIBSPDM_DATA_MUT_AUTH_REQUESTED- Specifies whether the Responder requires session-based mutual authentication with the
Requester via asymmetric key exchange. Its value can be one of
SPDM_KEY_EXCHANGE_RESPONSE_MUT_AUTH_REQUESTED- Used when the Responder is in possession of the Requester's public key and does not want to issue encapsulated requests to get a certificate chain from the Requester.
SPDM_KEY_EXCHANGE_RESPONSE_MUT_AUTH_REQUESTED_WITH_ENCAP_REQUEST- Used when the Responder wants to issue
GET_CERTIFICATEencapsulated requests to the Requester to retrieve certificate chains.
- Used when the Responder wants to issue
SPDM_KEY_EXCHANGE_RESPONSE_MUT_AUTH_REQUESTED_WITH_GET_DIGESTS- Similar to
SPDM_KEY_EXCHANGE_RESPONSE_MUT_AUTH_REQUESTED_WITH_ENCAP_REQUESTexcept the Responder embeds aGET_DIGESTSrequest in its response to the Requester. This may improve performance.
- Similar to
- Specifies whether the Responder requires session-based mutual authentication with the
Requester via asymmetric key exchange. Its value can be one of
LIBSPDM_DATA_MAX_SPDM_SESSION_SEQUENCE_NUMBER- Specifies the number of messages that can encrypted or decrypted before an error is returned
to the Integrator. The sequence number used to track these messages is 64 bits and the
default maximum value is
0xffffffffffffffff. IfLIBSPDM_DATA_MAX_SPDM_SESSION_SEQUENCE_NUMBERis set to0then the default value is used.
- Specifies the number of messages that can encrypted or decrypted before an error is returned
to the Integrator. The sequence number used to track these messages is 64 bits and the
default maximum value is
LIBSPDM_DATA_SPDM_VERSION_10_11_VERIFY_SIGNATURE_ENDIAN- Specifies how verification of asymmetric signatures is handled when the negotiated SPDM
version is 1.0 or 1.1. Its value is one of
LIBSPDM_SPDM_10_11_VERIFY_SIGNATURE_ENDIAN_BIG_ONLY- The endianness of the signature is only interpreted as big-endian. (default)
LIBSPDM_SPDM_10_11_VERIFY_SIGNATURE_ENDIAN_LITTLE_ONLY- The endianness of the signature is only interpreted as little-endian.
LIBSPDM_SPDM_10_11_VERIFY_SIGNATURE_ENDIAN_BIG_OR_LITTLE- The endianness of the signature is first interpreted as big-endian. If verification fails then little-endian is tried.
- Specifies how verification of asymmetric signatures is handled when the negotiated SPDM
version is 1.0 or 1.1. Its value is one of
LIBSPDM_DATA_SEQUENCE_NUMBER_ENDIAN- Specifies the endianness of the AEAD sequence number used in secured message encryption and
decryption when the negotiated secured SPDM version is 1.0 or 1.1. Its value is one of
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_LITTLE_DEC_LITTLE- Data is both encrypted and decrypted with a little-endian sequence number. (default)
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_LITTLE_DEC_BOTH- Data is encrypted with a little-endian sequence number and data is initially decrypted with a little-endian sequence number. If decryption fails then a big-endian sequence number is tried.
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_BIG_DEC_BIG- Data is both encrypted and decrypted with a big-endian sequence number.
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_BIG_DEC_BOTH- Data is encrypted with a big-endian sequence number and data is initially decrypted with a big-endian sequence number. If decryption fails then a little-endian sequence number is tried.
- For practical purposes
*_BOTHonly applies to Responder endpoints. In the scenario where Requester and Responder exclusively support different endianness encodings, the Responder may return aDecryptErrorto the Requester or it may not return an error and terminate the session. In such a situation the Requester Integrator may change the sequence number endianness to the opposite value and try again with session establishment. Once a session has been successfully established, the correct endianness can be queried fromLIBSPDM_DATA_SESSION_SEQUENCE_NUMBER_ENDIAN. - When the negotiated secured SPDM version is 1.2 or greater then libspdm unconditionally uses
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_LITTLE_DEC_LITTLE.
- Specifies the endianness of the AEAD sequence number used in secured message encryption and
decryption when the negotiated secured SPDM version is 1.0 or 1.1. Its value is one of
LIBSPDM_DATA_MULTI_KEY_CONN_REQ- Specifies the Requester's multi-key state for the connection. This is set following
NEGOTIATE_ALGORITHMS / ALGORITHMS.- If
truethen the Requester supports multi-key capabilities during the connection. - If
falsethen Requester does not support multi-key capabilities and only supports a single asymmetric key during the connection.
- If
- Only
LIBSPDM_DATA_LOCATION_CONNECTIONis allowed.
- Specifies the Requester's multi-key state for the connection. This is set following
LIBSPDM_DATA_MULTI_KEY_CONN_RSP- Specifies the Responder's multi-key state for the connection. This is set following
NEGOTIATE_ALGORITHMS / ALGORITHMS.- If
truethen the Responder supports multi-key capabilities during the connection. - If
falsethen Responder does not support multi-key capabilities and only supports a single asymmetric key during the connection.
- If
- Only
LIBSPDM_DATA_LOCATION_CONNECTIONis allowed.
- Specifies the Responder's multi-key state for the connection. This is set following
Values that can only be get.
LIBSPDM_DATA_PEER_SLOT_MASK- The value of the peer's certificate chain slot mask that was returned in the most recent
DIGESTSresponse. It is a bitmask that indicates if a certificate chain slot is populated, where the least significant bit corresponds to slot 0 and the most significant bit corresponds to slot 7.
- The value of the peer's certificate chain slot mask that was returned in the most recent
LIBSPDM_DATA_SESSION_SECURED_MESSAGE_VERSION- For a given session ID, returns the negotiated secured message version.
LIBSPDM_DATA_SESSION_USE_PSK- For a given session ID, returns whether the session was established via symmetric key exchange (true) or asymmetric key exchange (false).
LIBSPDM_DATA_SESSION_MUT_AUTH_REQUESTED- For a given session ID, returns whether the Responder has requested mutual authentication with the Requester.
LIBSPDM_DATA_SESSION_END_SESSION_ATTRIBUTES- Can be
getwith either a session ID or without one. If a session ID is present then this returns the end session attributes for the session. If a session ID is not present then this returns the union of the end session attributes for all sessions, and is a sticky bit such that once set to1it cannot be set to0except by initializing the SPDM context. This value is only used by a Responder. - This is a bitmask whose fields are defined by the
SPDM_END_SESSION_REQUEST_ATTRIBUTES_*macros. SPDM_END_SESSION_REQUEST_ATTRIBUTES_PRESERVE_NEGOTIATED_STATE_CLEAR- If set then the Responder will clear its negotiated connection state derived from
VCA. If not set then Responder will maintain its negotiated connection state. - Only valid if the Responder supports
VCAcaching (CACHE_CAPis set).
- If set then the Responder will clear its negotiated connection state derived from
- Can be
LIBSPDM_DATA_SESSION_SEQUENCE_NUMBER_REQ_DIR- For a given session ID, returns the number of application data messages that have been encrypted / decrypted in the request (Requester to Responder) direction.
- This value is only applicable when the local endpoint is in the
LIBSPDM_SESSION_STATE_ESTABLISHEDstate.
LIBSPDM_DATA_SESSION_SEQUENCE_NUMBER_RSP_DIR- For a given session ID, returns the number of application data messages that have been encrypted / decrypted in the response (Responder to Requester) direction.
- This value is only applicable when the local endpoint is in the
LIBSPDM_SESSION_STATE_ESTABLISHEDstate.
LIBSPDM_DATA_SESSION_SEQUENCE_NUMBER_ENDIAN- For a given session ID, returns the endianness of the AEAD sequence number when the
negotiated secured SPDM version is 1.0 or 1.1. Its value is one of
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_LITTLE_DEC_LITTLE- The endianness of the sequence number is little-endian.
LIBSPDM_DATA_SESSION_SEQ_NUM_ENC_BIG_DEC_BIG- The endianness of the sequence number is big-endian.
- For a given session ID, returns the endianness of the AEAD sequence number when the
negotiated secured SPDM version is 1.0 or 1.1. Its value is one of
LIBSPDM_DATA_REQUEST_AND_SIZE- Returns a pointer to the raw command buffer and the size of the command in bytes.
- This pointer is valid after libspdm_set_scratch_buffer is called, but the command itself is not valid unless the size returned is greater than zero. The command and its size will persist until the next command is received or the libspdm context is reset.
Values that can only be set.
LIBSPDM_DATA_SECURED_MESSAGE_VERSION- The SPDM secured message (DSP0277) version(s) (1.0/1.1/1.2) of the local endpoint. These are
communicated through the opaque data fields in
KEY_EXCHANGE / KEY_EXCHANGE_RSPorPSK_EXCHANGE / PSK_EXCHANGEmessages. - Once a secure session has been established then
LIBSPDM_DATA_SESSION_SECURED_MESSAGE_VERSIONcan be used to retrieve the negotiated secured message version. LIBSPDM_DATA_LOCATION_LOCAL- The SPDM secured message version(s) of the local endpoint.
- Can contain multiple entries.
- The SPDM secured message (DSP0277) version(s) (1.0/1.1/1.2) of the local endpoint. These are
communicated through the opaque data fields in