-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: unable to parse certificate with rsassa-pss algorithm #48314
Comments
@FiloSottile - do you have any idea on this? I see you have worked on RSA-PSS in the other packages. Thanks :) |
I ran into this error today. The OID for rsa-pss is 1.2.840.113549.1.1.10 and the function you would use to parse this type is x509.ParsePKCS8PrivateKey. That function only supports the rsa oid for 1.2.840.113549.1.1.1. If the rsa pss oid was added to the switch statement as a supported algorithm then it would parse correctly. Here is a playground that demonstrates parsing the rsa pss key manually |
@jpduckwo I hit this as well, so I looked around a bit. Here's a test that explicitly tests for this and here's an explainer from @FiloSottile why that is: #30416 (comment) |
The same error occurs:
If anyone knows a good library for RSA-PSS (RSASSA-PSS) keys, please, tell us. Thank you. |
What is the status of this? CSRs also fail to verify when signed with a PSS padding. This package is quite useless without complete RSA-PSS support. |
We came across this issue after being issued a self signed CA certificate that we needed to use to verify some signatures. The certificate uses the rsassa-pss algorithm. This is now supported in openssl, however it appears to be unsupported in the x509 package. We are unable to load the certificate public key and use it to verify signatures. RSA-PSS seems to be supported in the RSA and TLS packages however.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Using openssl 1.1 generate an rsa-pss certificate using the following command
Try to use this certificate in Go - the public key will be nil. Certificate below is just a test.
What did you expect to see?
The public key is parsed and loaded
What did you see instead?
The public key is nil
Further information
The certificate we are trying to use has the following attributes which I can't generate exactly the same with openssl. But the example still causes the same issues with Go
The text was updated successfully, but these errors were encountered: