Skip to content
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

Add 1.3 erase certificate feature for SET_CERTIFICATE #2433

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

Wenxing-hou
Copy link
Contributor

@Wenxing-hou Wenxing-hou commented Nov 14, 2023

Ref: #2292

  1. Add new 1.3 erase cert feature for set_certifcate;
  2. Add unit_test for erase cert feature;

The code has passed the unit_test.

@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from c7a9f75 to 118fd69 Compare November 15, 2023 01:40
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from ad26d56 to 0a8f7b7 Compare November 16, 2023 07:45
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from 90c20ad to a0913e6 Compare November 20, 2023 03:56
@steven-bellock steven-bellock changed the title Add new 1.3 erase cert feature for set_certifcate Add 1.3 erase certificate feature for SET_CERTIFICATE Nov 20, 2023
include/library/spdm_requester_lib.h Outdated Show resolved Hide resolved
include/hal/library/responder/setcertlib.h Outdated Show resolved Hide resolved
library/spdm_requester_lib/libspdm_req_set_certificate.c Outdated Show resolved Hide resolved
include/industry_standard/spdm.h Outdated Show resolved Hide resolved
library/spdm_requester_lib/libspdm_req_set_certificate.c Outdated Show resolved Hide resolved
library/spdm_responder_lib/libspdm_rsp_set_certificate.c Outdated Show resolved Hide resolved
library/spdm_responder_lib/libspdm_rsp_set_certificate.c Outdated Show resolved Hide resolved
@Wenxing-hou Wenxing-hou marked this pull request as draft November 30, 2023 02:04
@Wenxing-hou Wenxing-hou marked this pull request as ready for review December 7, 2023 12:35
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 3 times, most recently from e337b5d to 6d9aa22 Compare December 8, 2023 03:49
@jyao1 jyao1 requested a review from steven-bellock December 12, 2023 01:51
@Wenxing-hou
Copy link
Contributor Author

@steven-bellock Hi Steven, could you review again? I have fixed the code based on your feedback.

@steven-bellock
Copy link
Contributor

@Wenxing-hou the comment in https://github.com/DMTF/libspdm/pull/2433/files#r1400951233 is still valid. If the message was sent in a session then libspdm can check the exact size, else it cannot.

@Wenxing-hou
Copy link
Contributor Author

@Wenxing-hou the comment in https://github.com/DMTF/libspdm/pull/2433/files#r1400951233 is still valid. If the message was sent in a session then libspdm can check the exact size, else it cannot.

Thanks. I have fixed the code based on the feedback.

@Wenxing-hou
Copy link
Contributor Author

And I have added the table in code comment:

* | Cert State in Slot | Req(KeyPairID,CertMode) | Req(Erase) | Res(KeyPairID,CertMode) | Action |
* |-----------------------|-------------------------|------------|-----------------------------|--------------------------|
* | Not exist | - | - | - | Invalid |
* | exist and empty | Valid | No | Not exist | Provision |
* | exist and empty | Valid | Yes | Not exist | Invalid |
* | exist with key | Valid | No | KeyPairID/CertMode match | Provision |
* | exist with key | Valid | Yes | KeyPairID/CertMode match | Invalid |
* | exist with key | Valid | No | KeyPairID/CertMode not match| Invalid(or OverWrite) |
* | exist with key | Valid | Yes | KeyPairID/CertMode not match| Invalid |
* |exist with key and cert| Valid | No | KeyPairID/CertMode match | Invalid(or OverWrite) |
* |exist with key and cert| Valid | Yes | KeyPairID/CertMode match | Erase Cert |
* |exist with key and cert| Valid | No | KeyPairID/CertMode not match| Invalid |
* |exist with key and cert| Valid | Yes | KeyPairID/CertMode not match| Invalid |

@jyao1 jyao1 merged commit db32da6 into DMTF:main Jan 2, 2024
90 checks passed
@Wenxing-hou Wenxing-hou deleted the sync_setcert_1.3 branch July 3, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants