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

How to generate X509 v3 certificate for PKCS#8 encrypted #2373

Closed
meghaamity opened this issue Jan 24, 2019 · 2 comments
Closed

How to generate X509 v3 certificate for PKCS#8 encrypted #2373

meghaamity opened this issue Jan 24, 2019 · 2 comments

Comments

@meghaamity
Copy link

Note: This is just a template, so feel free to use/remove the unnecessary things

Description

  • Type: Question
  • Priority: Blocker

Question
I want to generate x509 certificate with PKCS#8 encrypted private key info embedded

How to do that? Please share the steps and API to be used to create such certificate?

@RonEld
Copy link
Contributor

RonEld commented Jan 27, 2019

@meghaamity Thank you for your question!
X509 certificates should not contain the private key embedded in them.
Do you mean a concatenation of a private key after a certificate in PEM?:

-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY----
-----END PRIVATE KEY----

If so, you will need to create a certificate, and write your PKCS8 encrypted private key after certificate, in the generated file.
To create a certificate, please look at the sample application for creating a certificate, and add your required extensions.

At the moment, Mbed TLS does not support generating a password protected PKCS8 private key.

@RonEld
Copy link
Contributor

RonEld commented Feb 18, 2019

We believe this issue has been addressed and answered, therefore closing.
If you believe it needs further action, please reopen with additional questions.
In addition, a support for writing PKCS#8 has been raised in #2413
Thanks!

@RonEld RonEld closed this as completed Feb 18, 2019
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

2 participants