Skip to content

Client rsa-sha2-512#890

Open
ejohnstown wants to merge 1 commit intowolfSSL:masterfrom
ejohnstown:rsa-sha512
Open

Client rsa-sha2-512#890
ejohnstown wants to merge 1 commit intowolfSSL:masterfrom
ejohnstown:rsa-sha512

Conversation

@ejohnstown
Copy link
Contributor

@ejohnstown ejohnstown commented Mar 9, 2026

  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

Copilot AI review requested due to automatic review settings March 9, 2026 17:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_KeySignature into separate key type (keyId) vs signature type (sigId) to correctly support RSA SHA-2 signature selection.
  • Enable/advertise rsa-sha2-512 in 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants