internal: sign without server-sig-algs - #1291
Draft
ejohnstown wants to merge 1 commit into
Draft
ejohnstown wants to merge 1 commit into
ejohnstown wants to merge 1 commit into
Conversation
EXT_INFO is optional, RFC 8308 section 2.2. When the server has sent no server-sig-algs, a publickey USERAUTH_REQUEST now picks the key's signature algorithm from the client's canned list, and an OpenSSH RSA certificate follows the same order. A list that names nothing usable still fails with WS_MATCH_KEY_ALGO_E. - record in peerSigAlgsSeen that server-sig-algs arrived - ClientOsshRsaCertSigId() picks the certificate's name and hash - regress: publickey requests with and without server-sig-algs - regress: the signature is named for the offered algorithm - regress: a list superseding a usable one still refuses Issue: wolfSSL#1286
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The fallback correctly distinguishes omission from explicit incompatibility and is well covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Allows public-key authentication when optional server-sig-algs is absent while preserving explicit mismatch failures.
Changes:
- Tracks whether
server-sig-algswas received. - Falls back to client algorithm preferences when absent.
- Adds RSA, ECDSA, certificate, and replacement regression coverage.
| File | Description |
|---|---|
wolfssh/internal.h |
Adds extension-presence state. |
src/internal.c |
Implements fallback signature selection. |
tests/regress.c |
Tests absent, unusable, and superseded lists. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
EXT_INFO is optional, RFC 8308 section 2.2. With no server-sig-algs, a publickey request now signs using the client's canned order instead of failing with WS_MATCH_KEY_ALGO_E; an OpenSSH RSA certificate follows it too.
Issue: #1286