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

SET_CERT: no full certificate chain verification for device with Alias certs #2854

Open
rw8896 opened this issue Oct 3, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@rw8896
Copy link
Contributor

rw8896 commented Oct 3, 2024

The current implementation verified the certificates received from SET_CERTIFICATE command but it didn't provide a mechanism for device with Alias certs to compose and then verify the full cert chain.
We could work around this issue by adding the verification in libspdm_write_certificate_to_nvm(), but I think it would be better to provide an official interface to allow customized verification similar to the one designed for peer certchain verification below?

I found there is a callback function

libspdm_verify_spdm_cert_chain_func verify_peer_spdm_cert_chain;

@steven-bellock
Copy link
Contributor

Related issue: #873.

Since the Responder is generating the certificates hopefully it's not going to generate invalid ones. The Integrator will need to populate the certificate slots after a reset, before which it can verify the full certificate chain. Maybe have libspdm_verify_peer_cert_chain_buffer_integrity be publicly available to Integrator?

@rw8896
Copy link
Contributor Author

rw8896 commented Oct 4, 2024

The certificates to be provisioned are generated by the requester so the responder still needs to verify if the full cert chain (to-be-provisioned certificates + Alias certificates) is valid.
While we could set CERT_INSTALL_RESET_CAP and simply save the certificates into NVARM and leave the verification to be done in the next reset, it would be better to verify the full cert chain without reset and prevent overwriting the existing ones in NVRAM in case of the verification failure.
libspdm_verify_peer_cert_chain_buffer_integrity by naming is to verify peer's certificates, but for SET_CERT it's to verify the certificate for self use. We could probably make libspdm_set_cert_verify_certchain to be a callback function but keep the current implementation as the default if no callback is registered?

@steven-bellock steven-bellock added the enhancement New feature or request label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants