Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates wolfSSH client public-key authentication handling so RSA key type (ssh-rsa) can be used with multiple RSA signature algorithms (including rsa-sha2-512), while also fixing algorithm list handling bugs in the example client and canned algorithm name list assembly.
Changes:
- Split
WS_KeySignatureinto separate key type (keyId) vs signature type (sigId) to correctly support RSA SHA-2 signature selection. - Enable/advertise
rsa-sha2-512in the canned key algorithm list (fixing list concatenation/termination). - Fix example client so setting a key algorithm list from the command line actually applies the provided list.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
wolfssh/internal.h |
Removes prior forced-disable of rsa-sha2-512; updates WS_KeySignature to separate key vs signature metadata. |
src/internal.c |
Updates auth request building to use sigId for hashing/signing; fixes canned algo list comma handling; adapts to new WS_KeySignature fields. |
examples/client/client.c |
Fixes client example to pass the configured keyList into wolfSSH_CTX_SetAlgoListKey(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
1. Separate the key type and signature type when handling user authentication. ssh-rsa is a key type used with rsa-sha2-256 and rsa-sha2-512 signatures, along with ssh-rsa signatures. 2. Allow rsa-sha2-512 to be used. 3. Fix bug where setting the key algorithm on the client command line was setting the list to NULL. 4. Fix bug where adding rsa-sha2-512 to the list of canned algorithms was terminating the list, rather that adding it. Issue: ZD-21247
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.
Issue: ZD-21247