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

Parsing a pkcs#12 file #4749

Open
vinaykarthikr opened this issue Jul 4, 2021 · 2 comments
Open

Parsing a pkcs#12 file #4749

vinaykarthikr opened this issue Jul 4, 2021 · 2 comments
Labels
enhancement help-wanted This issue is not being actively worked on, but PRs welcome.

Comments

@vinaykarthikr
Copy link

Hi,
I am in a project where we get a pkcs12(pfx) file and send it to our device where the file is parsed and the private key and
the certificate are stored in separate files for use in TLS communications. As far as i can see there is a function called mbedtls_pkcs12_pbe which looks like the function that should serve my need but it requires cipher_type and md_type which we dont know(can be anything based on the pfx generation) and can know only after successful parsing of the pkcs12 file.

Enhancement

It would be good if there was a function which parsed the pfx file with the password and populated the result into separate buffers for key and certificate contained in the file.

Justification

Mbed TLS needs this because pkcs#12/pfx is a very popular extension used in windows and this would allow the users to easily import and use pfx files.

@ronald-cron-arm
Copy link
Contributor

The "PKCS #12: Personal Information Exchange Syntax v1.1" specification is now the RFC 7292. If I understand correctly the request for enhancement is to determine from the parsing of the PKCS12 file the cipher and message digest used for encryption and authentication rather than relying on this to be determined beforehand.

@vinaykarthikr
Copy link
Author

Yes, your understanding is correct. The only detail that we have other than the PKCS12 file itself is the password, if one was used for creating it.

@gilles-peskine-arm gilles-peskine-arm added the help-wanted This issue is not being actively worked on, but PRs welcome. label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help-wanted This issue is not being actively worked on, but PRs welcome.
Projects
Status: No status
Development

No branches or pull requests

5 participants