On Thursday, 17 August 2017 09:11:12 UTC+2, Lucio wrote: > > > > On Friday, 11 August 2017 15:31:37 UTC+2, Terry An wrote: >> >> My private key is generated by "openssl req -new -x509 -keyout a.key -out >> a.crt -days 3650" with password. >> >> It seems you have a PKCS8 encrypted key, which needs somewhat special > treatment from the Go crypto library. > > I did a bit more investigating and found this issue:
*crypto/x509: no support for parsing encrypted PKCS8 private keys **#8860* I don't quite know enough to figure out for myself whether lack of support for BER (as opposed to DER) in the "encoding/asn1" standard library is a show stopper. If it is, any attempts to use encrypted PKCS8 will be doomed as the effort involved is significant. Maybe it is possible to add an "encoding/asn1/ber" extension, but my ASN.1 knowledge has slipped considerably since I stopped working in that environment. Lucio. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.