Skip to content

Fix --disable-server and --disable-client builds - #1313

Open
ejohnstown wants to merge 4 commits into
wolfSSL:masterfrom
ejohnstown:scp-accept-server-only
Open

ejohnstown wants to merge 4 commits into
wolfSSL:masterfrom
ejohnstown:scp-accept-server-only

Conversation

@ejohnstown

@ejohnstown ejohnstown commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

--enable-all with --disable-server or --disable-client failed to build. configure now drops the app whose side is disabled, the server SCP entry points build only with the server, and regress.c compiles with either side missing.

  • configure: leave out wolfsshd or the ssh client app along with its side, and stop with an error when that app was asked for outright
  • wolfscp.c: build wolfSSH_SCP_accept(), DoScpRequest() and ParseScpCommand() only under the server
  • regress.c: move AppendBlob() to the shared helpers so the client-only agent tests can reach it
  • os-check: build and check --enable-all with --disable-server and with --disable-client

A client-only library still built and exported wolfSSH_SCP_accept().
The server SCP entry points now sit under NO_WOLFSSH_SERVER, the way
the client ones already sit under NO_WOLFSSH_CLIENT.

- guard wolfSSH_SCP_accept(), DoScpRequest() and ParseScpCommand()
- guard the DoScpRequest() and ParseScpCommand() prototypes in
  internal.h
Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:46

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

Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 1 of 3 in-scope changed file(s) opened by the reviewer; not opened: tests/regress.c, wolfssh/internal.h

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

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.

🟡 Changes recommended

The fixed one-sided build configurations lack automated regression coverage.

1 open finding
What changed in this PR

Fixes --enable-all builds when either client or server support is disabled.

Changes:

  • Excludes incompatible applications during configuration.
  • Guards server-only SCP APIs.
  • Makes AppendBlob() available to client-only regression tests.
File Description
configure.ac Handles disabled-side application selection.
src/​wolfscp.c Guards server-only SCP implementations.
wolfssh/​internal.h Guards server-only SCP declarations.
tests/​regress.c Moves a shared test helper.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread configure.ac
--enable-all turns on wolfsshd and the ssh client app, so adding
--disable-server or --disable-client built an app against a library
missing its side and the link failed. configure now leaves out the app
whose side is disabled, and stops with an error when that app was asked
for outright.

- give the client-less main() stubs in portfwd and scpclient a
  prototype, which -Wstrict-prototypes requires before C23
The agent relay tests call AppendBlob() from the client-only block, but
it was defined inside the block that needs both client and server, so
--disable-server with the agent enabled failed to compile regress.c. It
now sits with the other shared Append helpers.
os-check now builds and runs make check on --enable-all with
--disable-server and with --disable-client, so a server-only call left
in a client build, or the reverse, fails in CI.

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

Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 0 of 2 in-scope changed file(s) opened by the reviewer; not opened: examples/portfwd/portfwd.c, examples/scpclient/scpclient.c

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