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: MarshalPKCS8PrivateKey doc says RSA private key while it supports more than that #36735

Closed
bigmikes opened this issue Jan 24, 2020 · 8 comments
Assignees
Milestone

Comments

@bigmikes
Copy link
Contributor

@bigmikes bigmikes commented Jan 24, 2020

Doc of x509.MarshalPKCS8PrivateKey says:

MarshalPKCS8PrivateKey converts an RSA private key to PKCS#8, ASN.1 DER form.

But immediately after doc says that it also supports ECDSA and ED25519 key types:

The following key types are currently supported: *rsa.PrivateKey, *ecdsa.PrivateKey and ed25519.PrivateKey. Unsupported key types result in an error.

I think that the "RSA" word in first line should be removed.

If this is confirmed, I can take care of this doc fix.

@toothrot
Copy link
Contributor

@toothrot toothrot commented Jan 24, 2020

@toothrot toothrot added this to the Backlog milestone Jan 24, 2020
@katiehockman
Copy link
Member

@katiehockman katiehockman commented Jan 24, 2020

Yep that just looks like a typo to me. I'd be happy to patch that. @FiloSottile do you agree that this is a bug?

@FiloSottile
Copy link
Member

@FiloSottile FiloSottile commented Jan 25, 2020

Yep, it's a typo. Go ahead!

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 5, 2020

Change https://golang.org/cl/217917 mentions this issue: crypto/x509: fix godoc for MarshalPKCS8PrivateKey

@gopherbot gopherbot closed this in 7a36fa4 Feb 5, 2020
@katiehockman
Copy link
Member

@katiehockman katiehockman commented Feb 5, 2020

@gopherbot please backport to 1.13 and 1.14

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 5, 2020

Backport issue(s) opened: #37067 (for 1.13), #37068 (for 1.14).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 5, 2020

Change https://golang.org/cl/217998 mentions this issue: [release-branch.go1.13] crypto/x509: fix godoc for MarshalPKCS8PrivateKey

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 5, 2020

Change https://golang.org/cl/217999 mentions this issue: [release-branch.go1.14] crypto/x509: fix godoc for MarshalPKCS8PrivateKey

gopherbot pushed a commit that referenced this issue Feb 5, 2020
…eKey

Updates #36735
Fixes #37067

Change-Id: I93f005d78f4bfac773272995b165172461bae92f
Reviewed-on: https://go-review.googlesource.com/c/go/+/217917
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit 7a36fa4)
Reviewed-on: https://go-review.googlesource.com/c/go/+/217998
gopherbot pushed a commit that referenced this issue Feb 5, 2020
…eKey

Updates #36735
Fixes #37068

Change-Id: I93f005d78f4bfac773272995b165172461bae92f
Reviewed-on: https://go-review.googlesource.com/c/go/+/217917
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit 7a36fa4)
Reviewed-on: https://go-review.googlesource.com/c/go/+/217999
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
5 participants
You can’t perform that action at this time.