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 · 1 comment


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.


This comment has been minimized.

Copy link

@FiloSottile FiloSottile commented Nov 5, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.