New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding/asn1: Marshal fails with ECDSA public keys #32541
Comments
Use |
Yeah in retrospect this makes sense. Ideally the x509 package would export its For now I have to essentially replicate the internals of that func and use |
Feel free to open a proposal issue for it. The two main reasons I can think of that might not get it accepted are if there is no reference for its format, or if it's not invertible without knowing the type in advance (that is, we can't write a corresponding Parse function). If you to address those, it will help getting it approved. |
I'm entirely opposed to opening marshalPublicKey, instead I suggested we split its functionality in 2 to increase type-safety in the program. Proposal: #32657 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
The latest stable release, yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I attempted to use the
asn1
package to encode the public portion of an ECDSA key.Here's a link to the playground: https://play.golang.org/p/Kwfs67b4KaI
What did you expect to see?
Encoded bytes.
What did you see instead?
An error.
The text was updated successfully, but these errors were encountered: