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

Comments

@gopherbot
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2014

Comment 1:

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

@agl

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

commented Oct 10, 2016

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

@hekmon

This comment has been minimized.

Copy link

commented Apr 11, 2018

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

@briansan

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

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
9 participants
You can’t perform that action at this time.