-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make libspdm_get_certificate_choose_length[_ex]() public APIs #2927
Conversation
0a9bb08
to
d2db719
Compare
include/library/spdm_requester_lib.h
Outdated
libspdm_return_t libspdm_get_certificate_choose_length(void *spdm_context, | ||
const uint32_t *session_id, | ||
uint8_t slot_id, | ||
uint16_t length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use uint32_t
, this is for new SPDM spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if
- negotiated version is <= 1.3 then
length
must must be<= 65535
- negotiated version is >= 1.4 then libspdm uses
LargeOffset
andLargeLength
.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please just check 0xFFFF in this version.
We can add more check for 1.4 later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For versions <= 1.3, even though we use uint32_t here, we will need to typecast it to uint16_t before passing it to libspdm_try_get_certificate in the function, after checking that length <= 0xFFFF. Trying to understand the motivation behind changing this to uint32 for the current version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to understand the motivation behind changing this to uint32 for the current version?
SPDM 1.4 will have 32-bit fields for Length
and Offset
due to how large PQC certificate chains can get. Since Length
is being exposed to the Integrator then just have it be 32-bits from the start, rather than having an _ex2
version once SPDM 1.4 comes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the _ex version to use uint32_t for length, as we are only exposing that so far. However, let me know if you would prefer the change for the non _ex version as well. I can make that change.
d2db719
to
f58d161
Compare
fix DMTF#2909 Signed-off-by: Shital Jumbad <sjumbad@nvidia.com>
f58d161
to
ec5b0df
Compare
fix #2909