Skip to content
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

crypto/x509: incorrect mention of "EC Public Key" for ParseECPrivateKey docs, should be "EC Private Key" #36788

Closed
matthew119427 opened this issue Jan 27, 2020 · 2 comments

Comments

@matthew119427
Copy link

@matthew119427 matthew119427 commented Jan 27, 2020

What version of Go are you using (go version)?

$ go version 1.13.5

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Manjaro Linux x64

What did you expect to see?

Documentation should read This kind of key is commonly encoded in PEM blocks of type "EC PRIVATE KEY".

What did you see instead?

The documentation for x509#ParseECPrivateKey states This kind of key is commonly encoded in PEM blocks of type "EC PUBLIC KEY"., however we're parsing a private key here, the block wouldn't be "EC PUBLIC KEY".
image

@agnivade
Copy link
Contributor

@agnivade agnivade commented Jan 28, 2020

@odeke-em odeke-em changed the title crypto/x509: Incorrect documentation crypto/x509: incorrect mention of "EC Public Key" for ParseECPrivateKey docs, should be "EC Private Key" Jan 29, 2020
@odeke-em
Copy link
Member

@odeke-em odeke-em commented Jan 29, 2020

Thank you for reporting this issue @matthew119427 and welcome to the Go project! Thank you @agnivade for the triage!

@matthew119427, this issue has been fixed for Go1.14 by @katiehockman's commit ee04dbf aka CL https://go-review.googlesource.com/c/go/+/207918 and you can see the change on https://tip.golang.org/pkg/crypto/x509/#ParseECPrivateKey
Screen Shot 2020-01-29 at 9 34 35 PM

Please keep noticing and reporting anything unusual. Thank you!

@odeke-em odeke-em closed this Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.