Question about ALGORITHMS for multiple tables
https://github.com/DMTF/libspdm/blob/b42d264dd770d6f14c2a2278c9942806e2c554fd/unit_test/test_spdm_responder/algorithms.c#L1139-L1204
Above TC (libspdm_test_responder_algorithms_case7) is for nonmal behavior with multiple tables.
https://github.com/DMTF/libspdm/blob/b42d264dd770d6f14c2a2278c9942806e2c554fd/library/spdm_responder_lib/libspdm_rsp_algorithms.c#L408-L439
In the current implementation, the same type of algorithm structure is overwritten when it comes. Therefore, when multiple tables are used, only the algorithm described last of the same type is set. I wonder it is correct.
The specification says
AlgType shall monotonically increase for subsequent entries.
and that is something that the Requester / Responder can check, and for the Responder's case it can return an ERROR response if the Requester has generated an algorithm structure with repeated entries or entries that are in reverse order.
@hiption Are you interested in creating a pull request to resolve this issue? It entails creating a counter to ensure that entries aren't repeated and are always increasing.
I agree with your comment that "it can return an ERROR response if the Requester has generated an algorithm structure with repeated entries or entries that are in reverse order".
I am interested in participating in libSpdm. However, PR is not possible due to the restrictions of my development environment.
I am sorry.