golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crypto/tls: needs a convenience function for reading encrypted keys

gopherbot opened this issue · comments

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.

Comment 1:

Labels changed: added go1.3maybe.

Comment 2:

Labels changed: added priority-later, packagechange, removed priority-triage.

Comment 3:

Labels changed: added release-none, removed go1.3maybe.

Comment 4:

Labels changed: added repo-main.

Hi,
is there any plan on implementing this?
there is a working sample code here: http://play.golang.org/p/8OYTuZtZIQ

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!