When adding an identity, validate that private key and public key (or… - #1168
Open
AlainKnaff wants to merge 8 commits into
Open
AlainKnaff wants to merge 8 commits into
AlainKnaff wants to merge 8 commits into
Conversation
… certificate) match, and that public key is actually a public key (or certificate)
norrisjeremy
suggested changes
Sep 30, 2026
norrisjeremy
left a comment
Contributor
There was a problem hiding this comment.
- Can you please run
mvn formatter:formatto correctly format the code changes? - Can you add some unit tests to properly exercise this, making sure to cover plain SSH keys & SSH certificates, and making sure to cover both cases in which the keys match and don't match?
norrisjeremy
suggested changes
Sep 30, 2026
added 5 commits
September 30, 2026 22:36
…ys are 2 entirely independant code paths... So we need the certificate compatibility check in the method with file names as well.
|
This branch has not been deployed
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 addresses issue #1161 by verifying that private key and public key (or certificate) actually match each other when adding an identity. This way, applications can warn the user right away when he's trying to add the bad certificate file, or a file that is not actually a certificate at all.