Skip to content

client/server-only builds + relocate examples#122

Merged
billphipps merged 9 commits into
wolfSSL:mainfrom
bigbrett:client-server-enable-macros
Jun 23, 2025
Merged

client/server-only builds + relocate examples#122
billphipps merged 9 commits into
wolfSSL:mainfrom
bigbrett:client-server-enable-macros

Conversation

@bigbrett

@bigbrett bigbrett commented Jun 16, 2025

Copy link
Copy Markdown
Contributor
  • Adds client/server enable macros allowiing for client-only or server-only builds
  • Adds a client-only TCP test build option that builds unit tests to run against a remote TCP server (to provide coverage for the above feature and ensure the client-only stack isn't dependent on any server-side functionality)
  • Adds GitHub action testing the above against the example server

@bigbrett
bigbrett requested review from billphipps and Copilot and removed request for Copilot June 16, 2025 21:54

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.

Pull Request Overview

This PR introduces build macros to support client‐only and server‐only builds and relocates example files. Key changes include:

  • Adding client/server enable macros and a client‐only TCP test build option.
  • Integrating GitHub Actions workflows for testing the updated configuration.

Reviewed Changes

Copilot reviewed 75 out of 75 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/demo/client/wh_demo_client_keystore.h New client keystore header with API declarations.
examples/demo/client/wh_demo_client_keystore.c Implements keystore functions including caching, committing, and eviction logic.
examples/demo/client/wh_demo_client_crypto.h Declares crypto demo functions supporting various algorithms.
examples/demo/client/wh_demo_client_counter.h & .c Adds a minimal counter demo.
examples/demo/client/wh_demo_client_all.h & .c Aggregates all client demo functions.
examples/demo/certs/* Adds demo certificate and key files for RSA, ECC, and Curve25519.
examples/demo/certs/genKeys.sh Provides a script for generating keys with a TODO regarding Curve25519 keys.
examples/README.md Updates documentation for example usage and build instructions.
benchmark/config/wolfhsm_cfg.h Adds macros to enable both client and server functionality.
.github/workflows/* Introduces and updates GitHub Actions workflows for various build configurations.
Comments suppressed due to low confidence (2)

examples/README.md:3

  • Typo found: 'aformentioned' should be corrected to 'aforementioned'.
This directory contains examples code demonstrating how to use various wolfHSM features. The examples provided are split between port-agnostic demo code, and port-specific server/client applications that use the aformentioned demo code.

examples/demo/client/wh_demo_client_keystore.c:212

  • Consider using a defined error constant instead of returning -1 directly, to maintain consistency with other wolfHSM error codes.
return -1;

Comment thread examples/demo/certs/genKeys.sh Outdated
billphipps
billphipps previously approved these changes Jun 20, 2025

@billphipps billphipps 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.

Loving the explicit server/client build options! Awesome that we can get all the examples in here now and simplify repo management!

Looks really good. I had a few comments and questions but I think it can go in without any changes if you don't agree with my comments

Comment thread benchmark/config/wolfhsm_cfg.h
Comment thread examples/posix/tcp/wh_server_tcp/wolfboot.nvminit Outdated
Comment thread src/wh_client_cert.c Outdated
Comment thread src/wh_client_crypto.c Outdated
Comment thread src/wh_flash_ramsim.c Outdated
Comment thread src/wh_flash_unit.c Outdated
Comment thread src/wh_nvm.c Outdated
Comment thread src/wh_nvm_flash.c Outdated
Comment thread src/wh_server_crypto.c Outdated
Comment thread wolfhsm/wh_settings.h Outdated
@bigbrett

Copy link
Copy Markdown
Contributor Author

Fixed all changes, CI will fail until #123 merges

@bigbrett
bigbrett requested a review from billphipps June 20, 2025 19:04
billphipps
billphipps previously approved these changes Jun 23, 2025
@bigbrett
bigbrett force-pushed the client-server-enable-macros branch from f2aeaf0 to 4f1c2db Compare June 23, 2025 14:33
@billphipps
billphipps merged commit fda4b62 into wolfSSL:main Jun 23, 2025
5 checks passed
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