-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
PKI: Add support for signature_bits param to the intermediate/generate api #17388
PKI: Add support for signature_bits param to the intermediate/generate api #17388
Conversation
…e api - Mainly to work properly with GCP backed managed keys, we need to issue signatures that would match the GCP key algorithm. - At this time due to golang/go#45990 we can't issue PSS signed CSRs, as the libraries in Go always request a PKCS1v15. - Add an extra check in intermediate/generate that validates the CSR's signature before providing it back to the client in case we generated a bad signature such as if an end-user used a GCP backed managed key with a RSA PSS algorithm. - GCP ignores the requested signature type and always signs with the key's algorithm which can lead to a CSR that says it is signed with a PKCS1v15 algorithm but is actually a RSA PSS signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit about CheckSignature
location and a minor docs clarification I think
requireED25519SignedBy(t, cert, typedKey) | ||
default: | ||
require.Fail(t, "unknown public key type %#v", key) | ||
func requireSignedBy(t *testing.T, cert *x509.Certificate, signingCert *x509.Certificate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 -- I had thought of this change a while ago, but never actually submitted it, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Mainly to work properly with GCP backed managed keys, we need to issue signatures that would match the GCP key algorithm.
At this time due to crypto/x509: can't verify signature on RSA-PSS certificate requests it created golang/go#45990 we can't issue PSS signed CSRs, as the libraries in Go always request a PKCS1v15.
Add an extra check in intermediate/generate that validates the CSR's signature before providing it back to the client in case we generated a bad signature such as if an end-user used a GCP backed managed key with a RSA PSS algorithm.