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: Reference SubjectPublicKeyInfo in MarshalPKIXPublicKey #35313

jsha opened this issue Nov 1, 2019 · 2 comments

crypto/x509: Reference SubjectPublicKeyInfo in MarshalPKIXPublicKey #35313

jsha opened this issue Nov 1, 2019 · 2 comments


Copy link

@jsha jsha commented Nov 1, 2019

The godoc for MarshalPKIXPublicKey and ParsePKIXPublicKey say, e.g. "ParsePKIXPublicKey parses a public key in PKIX, ASN.1 DER form." However, PKIX (RFC 5280), does not define a "public key" type. Instead, it defines a SubjectPublicKeyInfo type, which is what these methods are using. The docs should reference the more specific type name, and link straight to the RFC 5280 documentation for clarity.

As an aside, the ParseECPrivateKey docs incorrectly say "ParseECPrivateKey parses an EC public key".

If the Go team agrees this is a positive change, I'm happy to send a change.

Copy link

@FiloSottile FiloSottile commented Nov 5, 2019

Thanks, please do send a CL and add me as a reviewer.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.14, Backlog Dec 5, 2019
@FiloSottile FiloSottile modified the milestones: Backlog, Go1.15 Mar 31, 2020
Copy link

@gopherbot gopherbot commented Apr 17, 2020

Change mentions this issue: crypto/x509: clarify MarshalPKIXPublicKey and ParsePKIXPublicKey docs

@gopherbot gopherbot closed this in ef5c59d Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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