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
x/crypto/openpgp: pointer usage for rsa.PublicKey is inconsistent with crypto/x509 #27606
Labels
Milestone
Comments
Change https://golang.org/cl/137895 mentions this issue: |
I ran into the same issue. Sorry for jumping the gun, but I didn't see this issue until after I already had the CL prepared :) |
FiloSottile
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Sep 27, 2018
chintanparikh
pushed a commit
to opendoor-labs/openpgp
that referenced
this issue
Dec 11, 2019
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 28, 2022
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
LewiGoddard
pushed a commit
to LewiGoddard/crypto
that referenced
this issue
Feb 16, 2023
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
BiiChris
pushed a commit
to BiiChris/crypto
that referenced
this issue
Sep 15, 2023
Fixes golang/go#27606 Change-Id: I88b2f7c7796b43449a17a6be963c05f741dbf904 Reviewed-on: https://go-review.googlesource.com/137895 Reviewed-by: Filippo Valsorda <filippo@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?Also golang/crypto@0e37d00.
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I wrote some code which implements
crypto.Signer
. My original use case for this was to plug intogolang.org/x/crypto/openpgp
so I can perform PGP signatures using my signer. To do this, I had to make myPublicKey()
method return arsa.PublicKey
(no pointer) so I can pass the type check inNewSignerPrivateKey()
.So far, so good.
What did you expect to see?
I expected my
crypto.Signer
implementation to work, without changes, withcrypto/x509
.What did you see instead?
crypto/x509
also has a type check, but it checks for*rsa.PublicKey
(pointer) rather thanrsa.PublicKey
.It doesn't seem that I can implement one
crypto.Signer
that will work with bothgolang.org/x/crypto/openpgp
andcrypto/x509
. I think we can fix this and keep backwards compatibility by extending the the type check ingolang.org/x/crypto/openpgp
'sNewSignerPrivateKey()
to treat*rsa.PublicKey
the same asrsa.PublicKey
.Thanks to @joemiller for originally reporting this downstream (vmware-archive/google-kms-pgp#2).
The text was updated successfully, but these errors were encountered: