Skip to content

client/server-only builds + relocate examples #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 23, 2025

Conversation

bigbrett
Copy link
Contributor

@bigbrett bigbrett commented Jun 16, 2025

  • 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 Copilot and billphipps and removed request for Copilot June 16, 2025 21:54
Copy link
Contributor

@Copilot Copilot AI left a comment

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;

billphipps
billphipps previously approved these changes Jun 20, 2025
Copy link
Contributor

@billphipps billphipps left a comment

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

@bigbrett
Copy link
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.

2 participants