Skip to content

OpenSSH CA Certificate Support#1072

Open
stenslae wants to merge 1 commit into
wolfSSL:masterfrom
stenslae:feature/openssh-ca-certs
Open

OpenSSH CA Certificate Support#1072
stenslae wants to merge 1 commit into
wolfSSL:masterfrom
stenslae:feature/openssh-ca-certs

Conversation

@stenslae

Copy link
Copy Markdown
Member

Fixed memory leaks and verification logic in OpenSSH CA Certificate authentication.

  • Corrected Authentication Logic: Enforced a WSSHD_AUTH_FAILURE return code when the
    verification loop completes without finding a matching trusted CA fingerprint.
  • Resolved Memory Leaks
  • Adopted Secure I/O: Migrated all raw file system operations to WFOPEN , WFGETS , WFCLOSE.

@stenslae stenslae self-assigned this Jun 29, 2026

@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 #1072

Scan targets checked: wolfssh-bugs, wolfssh-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread apps/wolfsshd/auth.c
pk.isOsshCert = 1;
pk.caKeyHash = caKeyHash;
pk.caKeyHashSz = caKeyHashSz;
return CheckPublicKeyUnix(NULL, &pk, caKeysFile, NULL, NULL);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 [Low] Test helper references Unix-only CheckPublicKeyUnix without !_WIN32 guard · API contract violations

wolfSSHD_TestCheckOsshCertCa (and its auth.h:104 prototype) is guarded only by WOLFSSHD_UNIT_TEST && WOLFSSH_OSSH_CERTS, but calls CheckPublicKeyUnix, which exists only under #ifndef _WIN32. A Windows unit-test build with OSSH certs fails to compile/link; sibling helpers in auth.h are correctly !_WIN32 guarded.

Fix: Wrap the helper's declaration and definition in #ifndef _WIN32, matching the other Unix-only unit-test helpers.

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.

2 participants