Skip to content

Commit

Permalink
libspdm: responder: Support PSK with ResponderContext
Browse files Browse the repository at this point in the history
We currently advertise that we support

    Pre-Shared Key but does not provide ResponderContext for session key derivation.

Let's update this to instead advertise

    Pre-Shared Key and provides ResponderContext for session key derivation

The SPDM spec states that:

     the Responder is required to use ResponderContext if it can generate a nonce

which we can, so let's adertise ResponderContext.

This also allows the libspdm function libspdm_get_response_psk_finish() to
work correctly.

Signed-off-by: Alistair Francis <[email protected]>
  • Loading branch information
alistair23 committed Jul 29, 2024
1 parent 4d57ab3 commit d254ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libspdm/responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn setup_capabilities(
let mut data: u32 = SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CERT_CAP
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_ENCRYPT_CAP
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_KEY_EX_CAP
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_PSK_CAP_RESPONDER
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_PSK_CAP_RESPONDER_WITH_CONTEXT
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CHAL_CAP
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_SIG
| SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MAC_CAP
Expand Down

0 comments on commit d254ace

Please sign in to comment.