generated a self signed cert:
openssl req -x509 -nodes -days 365 -subj '/C=US/ST=<state here>/CN=<domain here>' -newkey rsa:1024 -keyout key.pem -out cert.pem
running
err := http.ListenAndServeTLS(":10443", "cert.pem", "key.pem", nil)
as documented in package documentation
and getting error
crypto/tls: failed to parse key: ASN.1 structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 set:false} @5
I verified the cert, etc. and everything looks good.
Any suggestions? Any special config needed when generating the cert/key with openssl?