Skip to content

add macro guard on SHA512 hashType#357

Draft
JacobBarthelmeh wants to merge 1 commit intowolfSSL:mainfrom
JacobBarthelmeh:build
Draft

add macro guard on SHA512 hashType#357
JacobBarthelmeh wants to merge 1 commit intowolfSSL:mainfrom
JacobBarthelmeh:build

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

No description provided.

@JacobBarthelmeh JacobBarthelmeh self-assigned this May 9, 2026
Copilot AI review requested due to automatic review settings May 9, 2026 04:30
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #357

Scan targets checked: wolfhsm-crypto-bugs, wolfhsm-src

No new issues found in the changed files. ✅

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 improves compatibility with wolfSSL builds where SHA-512 is enabled but wc_Sha512 does not include the hashType member (WOLFSSL_SHA512_HASHTYPE is not defined), by adding compile-time guards and extending CI to cover that configuration.

Changes:

  • Guard SHA-512 async/DMA test helpers and their invocation behind WOLFSSL_SHA512_HASHTYPE.
  • Guard the server-side DMA SHA-512 resume-state assignment to sha512->hashType behind WOLFSSL_SHA512_HASHTYPE.
  • Add a NO_SHA512_HASHTYPE=1 test build mode and a CI job to build/run with that configuration.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/wh_test_crypto.c Avoids compiling/calling SHA-512 async/DMA tests when WOLFSSL_SHA512_HASHTYPE is not available.
test/Makefile Adds NO_SHA512_HASHTYPE=1 build option to disable WOLFSSL_SHA512_HASHTYPE via test user settings.
test/config/user_settings.h Makes WOLFSSL_SHA512_HASHTYPE conditional on WHTEST_NO_SHA512_HASHTYPE.
src/wh_server_crypto.c Avoids referencing wc_Sha512.hashType when the member is not present.
.github/workflows/build-and-test.yml Adds CI coverage for DMA builds with SHA-512 enabled but WOLFSSL_SHA512_HASHTYPE disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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