Please answer these questions before submitting your issue. Thanks!
go version)?go1.10.3
considering this is the present release, yes.
go env)?GOARCH="amd64"
GOOS="windows"
windows7
I use the following command to create two files.
openssl req -x509 -sha256 -nodes -newkey ec:<(openssl ecparam -name secp256k1) -keyout tls1.key -out tls1.crt -days 3650 -subj "/O=Bar/CN=Foo"
I test them with the following code.
package main
import (
"fmt"
"crypto/tls"
)
func main() {
certFile := "e:/evan/goland/src/medichain/key/sdk.crt"
keyFile := "e:/evan/goland/src/medichain/key/sdk.key"
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(cert)
}
Well, i hope it would be no error.
I got the error 'tls: failed to parse private key'
I need this curve .
Would you do some help?
Any help would be greatly appreciated
CC @FiloSottile
Hey, support for that curve still needs to be added before golang's X.509 parser will be able to produce a keypair, as it's not a NIST curve, but a SEC Koblitz curve. I have a proposal which should address this:
@cag This proposal is great.
I wonder if your go fork has this curve supported.
Most helpful comment
Hey, support for that curve still needs to be added before golang's X.509 parser will be able to produce a keypair, as it's not a NIST curve, but a SEC Koblitz curve. I have a proposal which should address this:
https://github.com/golang/go/issues/26776