crypto/tls: needs a convenience function for reading encrypted keys
gopherbot opened this issue · comments
GopherBot commented
by jeff.allen:
crypto/tls.X509KeyPair can't deal with encrypted key files. This wouldn't be much of a big deal except that the quantity of code needed to work around it is really big and repeats lots of code from the std library. See this message: https://groups.google.com/d/msg/golang-nuts/ht_gQ2ET0c0/efaGZdIxCmAJ It would be nicer to have crypto/tls.X509EncryptedKeyPair(certPEMBlock, keyPEMBlock, password []byte) (cert Certificate, err error) that would use password to decrypt keyPEMBlock.
Russ Cox commented
David Symonds commented
Russ Cox commented
Russ Cox commented
Serhat Şevki Dinçer commented
Hi,
is there any plan on implementing this?
there is a working sample code here: http://play.golang.org/p/8OYTuZtZIQ
Emmanuel T Odeke commented
/cc @agl
Emmanuel T Odeke commented
Hello there @jfcg, might you still be interested in working on this issue?
Perhaps putting it in a CL would re-ignite the conversation and make it reviewable
thus implementing the feature.
Thank you!