Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
crypto/x509: ParseCertificate fails for ECDSA certificate, gives asn1 unmarshal error #21502
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
These are the commands we used to generate the cert:
It looks like the
when parsing an ECDSA certificate, improve the error message upon failing to parse the curve as a named curve, rather than returning the original ASN1 error. Fixes golang#21502 (sort of, to the extent that it needs fixing)
Go assumes that an ECDSA curve as specified in a certificate is always going to be a named curve.
Named curves are only one of 3 valid ways of specifying a curve, according to RFC 5480, but the only way to do so for x.509 certificates:
The failing certificate uses