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
gmichelo opened this issue Jan 24, 2020 · 8 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@gmichelo
Copy link
Contributor

gmichelo 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

/cc @FiloSottile @katiehockman

@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 24, 2020
@toothrot toothrot added this to the Backlog milestone Jan 24, 2020
@katiehockman
Copy link
Contributor

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
Contributor

Yep, it's a typo. Go ahead!

@FiloSottile FiloSottile added Documentation NeedsFix The path to resolution is known, but the work has not been done. labels Jan 25, 2020
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 25, 2020
@FiloSottile FiloSottile modified the milestones: Backlog, Go1.14 Feb 4, 2020
@gopherbot
Copy link

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

@katiehockman
Copy link
Contributor

@gopherbot please backport to 1.13 and 1.14

@gopherbot
Copy link

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

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

@gopherbot
Copy link

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
@golang golang locked and limited conversation to collaborators Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants