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

Make certificate fields of pkcs7 data structures publicly available #9060

Open
gabor-toth-arm opened this issue Apr 26, 2024 · 0 comments
Open

Comments

@gabor-toth-arm
Copy link
Contributor

Suggested enhancement

I would like to extract Subject Common Name and tbsCertificate from a mbedtls_pkcs7 object to implement UEFI variable authentication. I need these data from different certificates in the chain, so I also need to be able to iterate through the chain.
For this I need to access the listed fields:
mbedtls_pkcs7.private_signed_data.private_certs.subject
mbedtls_pkcs7.private_signed_data.private_certs.tbs
mbedtls_pkcs7.private_signed_data.private_certs.next

Currently they are only accessible as private variables.

Justification

The authentication is defined by UEFI spec, which says tbsCertificate (of the top-level issuer) and CommonName of the signing certificate's subject are need to be used.
For reference: https://uefi.org/specs/UEFI/2.10/08_Services_Runtime_Services.html?highlight=tbscertificate#using-the-efi-variable-authentication-2-descriptor

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

No branches or pull requests

1 participant