Skip to content

ossh: drop the dead ID_UNKNOWN branch - #1352

Open
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:key-container-wipe
Open

ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:key-container-wipe

Conversation

@ejohnstown

Copy link
Copy Markdown
Contributor

GetOpenSshKey() returns WS_UNIMPLEMENTED_E itself for a key-type name
it does not know, so the ID_UNKNOWN check in IdentifyOpenSshKey() can
never be true.

  • Remove the dead branch; a unit test pins the WS_UNIMPLEMENTED_E result

This and #1351 both add a test at the same spot in tests/unit.c;
whichever merges second will be rebased onto the other.

Issue: F-13330

GetOpenSshKey() leaves no keyId for a key-type name it does not know
and returns WS_UNIMPLEMENTED_E itself, so IdentifyOpenSshKey() never
sees ID_UNKNOWN after a failure and passes that result straight on.

- tests/unit.c adds test_IdentifyOpenSshKeyUnknownName() for the
  WS_UNIMPLEMENTED_E result on an unknown key-type name.

Issue: F-13330
Copilot AI balanced review requested due to automatic review settings October 29, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #1352

Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

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.

4 participants