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

crypto/x509: no support for parsing encrypted PKCS8 private keys #8860

Open
gopherbot opened this issue Oct 3, 2014 · 7 comments
Open

crypto/x509: no support for parsing encrypted PKCS8 private keys #8860

gopherbot opened this issue Oct 3, 2014 · 7 comments
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 3, 2014

by alex.gaynor:

Right now only un-encrypted keys are supported, it would be good if encrypted ones were
as well.
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 3, 2014

Comment 1:

Labels changed: added repo-main, release-none.

@agl
Copy link
Contributor

@agl agl commented Oct 6, 2014

Comment 2:

No plans to implement this. If it's encrypted at the PEM layer, you can use
http://godoc.org/crypto/x509#DecryptPEMBlock. If it's actually the PKCS#5/PKCS#8
encryption then you're correct that there's no Go support.

Status changed to LongTerm.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Oct 6, 2014

Comment 3 by alex.gaynor:

Yes, I'm talking about a case that really uses the EncryptedPrivateKeyInfo ASN.1
structure.
@odeke-em
Copy link
Member

@odeke-em odeke-em commented Oct 10, 2016

Related bug #6722 that when solved could help close this one.

@hekmon
Copy link

@hekmon hekmon commented Apr 11, 2018

This lib worked for me:
https://github.com/youmark/pkcs8

@briansan
Copy link

@briansan briansan commented May 10, 2018

given that OpenSSL defaults to using pkcs#8 for encrypting private keys, don't you feel that supporting the decryption of these keys should be high priority item for Go?
cc @ken @robpike

@robpike
Copy link
Contributor

@robpike robpike commented May 10, 2018

I have no opinion on the subject. Not a domain expert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.