Skip to content

Add WOLFHSM_CFG_CANCEL_API for opt-in cancellation support#187

Merged
AlexLanzano merged 2 commits intowolfSSL:mainfrom
jackctj117:CMAC-cancellation-fix
Oct 2, 2025
Merged

Add WOLFHSM_CFG_CANCEL_API for opt-in cancellation support#187
AlexLanzano merged 2 commits intowolfSSL:mainfrom
jackctj117:CMAC-cancellation-fix

Conversation

@jackctj117
Copy link
Copy Markdown
Contributor

Fix for #168 (review)

  • Revert broad WOLFHSM_CFG_TEST_CLIENT_ONLY_TCP gating
  • Add WOLFHSM_CFG_CANCEL_API to compile out cancellation by default
  • Properly guard test server instrumentation with WOLFHSM_CFG_IS_TEST_SERVER
  • Disabled serverDelay

@jackctj117 jackctj117 self-assigned this Sep 24, 2025
@jackctj117 jackctj117 requested a review from Copilot September 24, 2025 19:08
Copy link
Copy Markdown
Contributor

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 an optional cancellation API feature through the WOLFHSM_CFG_CANCEL_API configuration flag. The changes revert previous broad gating and implement proper feature-specific guarding for cancellation functionality.

  • Add WOLFHSM_CFG_CANCEL_API configuration flag to make cancellation support opt-in
  • Guard cancellation-related code, structures, and functions with the new configuration flag
  • Replace broad WOLFHSM_CFG_TEST_CLIENT_ONLY_TCP gating with more specific WOLFHSM_CFG_IS_TEST_SERVER guards for test instrumentation

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wolfhsm/wh_settings.h Adds documentation for the new WOLFHSM_CFG_CANCEL_API configuration flag
wolfhsm/wh_server.h Guards server-side cancellation fields and functions with WOLFHSM_CFG_CANCEL_API
wolfhsm/wh_client.h Guards client-side cancellation fields and functions with WOLFHSM_CFG_CANCEL_API
test/wh_test_crypto.c Updates test code to use proper feature guards and temporarily disables server delay
src/wh_server_crypto.c Guards cancellation handling in crypto operations with WOLFHSM_CFG_CANCEL_API
src/wh_server.c Guards server cancellation functions and message handling with WOLFHSM_CFG_CANCEL_API
src/wh_client_crypto.c Guards cancellable response handling with WOLFHSM_CFG_CANCEL_API
src/wh_client.c Guards client cancellation functions with WOLFHSM_CFG_CANCEL_API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/wh_test_crypto.c Outdated
Comment thread src/wh_server_crypto.c Outdated
@AlexLanzano AlexLanzano merged commit 6f1e98a into wolfSSL:main Oct 2, 2025
10 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.

4 participants