[v16] support non-RSA SSH signatures#45890
Merged
nklaassen merged 1 commit intobranch/v16from Aug 27, 2024
Merged
Conversation
zmb3
approved these changes
Aug 27, 2024
tigrato
approved these changes
Aug 27, 2024
espadolini
approved these changes
Aug 27, 2024
| // toRSASHA512Signer forces an ssh.MultiAlgorithmSigner into using | ||
| // "rsa-sha2-sha512" (instead of its SHA256 default). | ||
| func toRSASHA512Signer(signer ssh.Signer) ssh.Signer { | ||
| if signer.PublicKey().Type() != ssh.KeyAlgoRSA { |
Contributor
There was a problem hiding this comment.
Aren't we doing the same check in the caller of toRSASHA512Signer?
Contributor
Author
There was a problem hiding this comment.
we do in master, but not in branch/v16, which is the base branch of this PR. Current v16 is broken for all non-RSA keys (but we only ever generate RSA keys so its mostly fine). This is a much simplified version of #45887 which updates toRSASHA512Signer to a new sshSignerFromCryptoSigner which specifically selects signature algorithms for all key types and sizes
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for signing SSH certs with non-RSA keys. We don't generate any non-RSA keys in v16, but it's possible for a user to import them into a CA manually.
changelog: add support for non-RSA SSH signatures with imported CA keys