Skip to content

Latest commit

 

History

History
170 lines (127 loc) · 5.7 KB

16.EndSessionAck.md

File metadata and controls

170 lines (127 loc) · 5.7 KB

16. Test Case for END_SESSION_ACK

Case 16.1

Description: SPDM responder shall return valid END_SESSION_ACK, if it receives a END_SESSION in DHE session.

SPDM Version: 1.1+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.1 or above is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.KEY_EX_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  13. CERTIFICATE <- Responder
  14. Requester -> KEY_EXCHANGE {SPDMVersion=NegotiatedVersion, ...}
  15. KEY_EXCHANGE_RSP <- Responder
  16. Requester -> FINISH {SPDMVersion=NegotiatedVersion, ...} in session-X
  17. FINISH_RSP <- Responder in session-X

TestTeardown: None

Steps:

  1. Requester -> END_SESSION {SPDMVersion=NegotiatedVersion, Param1.StatePreservation=0, Param2=0} in session-X
  2. SpdmMessage <- Responder in session-X

Assertion 16.1.1: sizeof(SpdmMessage) >= sizeof(END_SESSION_ACK)

Assertion 16.1.2: SpdmMessage.RequestResponseCode == END_SESSION_ACK

Assertion 16.1.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Case 16.2

Description: SPDM responder shall return ERROR(VersionMismatch), if it receives a END_SESSION with non negotiated version in DHE session.

SPDM Version: 1.1+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.1 or above is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.KEY_EX_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  13. CERTIFICATE <- Responder
  14. Requester -> KEY_EXCHANGE {SPDMVersion=NegotiatedVersion, ...}
  15. KEY_EXCHANGE_RSP <- Responder
  16. Requester -> FINISH {SPDMVersion=NegotiatedVersion, ...} in session-X
  17. FINISH_RSP <- Responder in session-X

TestTeardown: None

Steps:

  1. Requester -> END_SESSION {SPDMVersion=(NegotiatedVersion+1), ...} in session-X
  2. SpdmMessage <- Responder in session-X

Assertion 16.2.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 16.2.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 16.2.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 16.2.4: SpdmMessage.Param1 == VersionMismatch.

Assertion 16.2.5: SpdmMessage.Param2 == 0.

  1. Requester -> END_SESSION {SPDMVersion=(NegotiatedVersion-1), ...} in session-X
  2. SpdmMessage <- Responder in session-X

Assertion 16.2.*.

Case 16.3

Description: SPDM responder shall return ERROR(UnexpectedRequest), if it receives a END_SESSION in DHE session handshake.

SPDM Version: 1.1+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.1 or above is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.KEY_EX_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  13. CERTIFICATE <- Responder
  14. Requester -> KEY_EXCHANGE {SPDMVersion=NegotiatedVersion, ...}
  15. KEY_EXCHANGE_RSP <- Responder

TestTeardown: None

Steps:

  1. Requester -> END_SESSION {SPDMVersion=NegotiatedVersion, Param1.StatePreservation=0, Param2=0} in session-X
  2. SpdmMessage <- Responder in session-X

Assertion 16.3.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 16.3.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 16.3.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 16.3.4: SpdmMessage.Param1 == UnexpectedRequest.

Assertion 16.3.5: SpdmMessage.Param2 == 0.

Case 16.4

Description: SPDM responder shall return ERROR(SessionRequired), if it receives a END_SESSION in non-session.

SPDM Version: 1.2

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.KEY_EX_CAP == 0 && Flags.PSK_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder

TestTeardown: None

Steps:

  1. Requester -> END_SESSION {SPDMVersion=NegotiatedVersion, Param1.StatePreservation=0, Param2=0}
  2. SpdmMessage <- Responder

Assertion 16.4.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 16.4.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 16.4.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 16.4.4: SpdmMessage.Param1 == SessionRequired.