1919 * @param spdm_context A pointer to the SPDM context.
2020 * @param spdm_version Indicates the negotiated version.
2121 *
22- * @param slot_id The number of slot for the certificate chain .
22+ * @param slot_id Slot ID of the CHALLENGE request .
2323 * @param request_context_size The size, in bytes, of request_context.
2424 * @param request_context If spdm_version is greater than 1.2, then it is a pointer to the
25- * Context field in the request message, else it is NULL and ignore
25+ * Context field in the request message, else it is NULL and ignore.
2626 *
2727 * @param opaque_data
2828 * A pointer to a destination buffer whose size, in bytes, is opaque_data_size. The opaque data is
@@ -40,7 +40,30 @@ extern bool libspdm_challenge_opaque_data(
4040 const void * request_context ,
4141 void * opaque_data ,
4242 size_t * opaque_data_size );
43- #endif /*LIBSPDM_ENABLE_CAPABILITY_CHAL_CAP*/
43+
44+ #if LIBSPDM_ENABLE_CAPABILITY_MUT_AUTH_CAP
45+ /**
46+ * Queries whether basic mutual authentication should be initiated or not.
47+ *
48+ * @param spdm_context A pointer to the SPDM context.
49+ * @param spdm_version Indicates the negotiated version.
50+ *
51+ * @param slot_id Slot ID of the CHALLENGE request.
52+ * @param request_context_size The size, in bytes, of request_context.
53+ * @param request_context If spdm_version is greater than 1.2, then it is a pointer to the
54+ * Context field in the request message, else it is NULL and ignore.
55+ *
56+ * @retval true Initiate the basic mutual authentication flow.
57+ * @retval false Do not initiate the basic mutual authentication flow.
58+ */
59+ extern bool libspdm_challenge_start_mut_auth (
60+ void * spdm_context ,
61+ spdm_version_number_t spdm_version ,
62+ uint8_t slot_id ,
63+ size_t request_context_size ,
64+ const void * request_context );
65+ #endif /* LIBSPDM_ENABLE_CAPABILITY_MUT_AUTH_CAP */
66+ #endif /* LIBSPDM_ENABLE_CAPABILITY_CHAL_CAP */
4467
4568/**
4669 * Sign an SPDM message data.
0 commit comments