Skip to content

back out sha512 hash type tests and leave only single macro guard in …#369

Closed
JacobBarthelmeh wants to merge 1 commit into
wolfSSL:mainfrom
JacobBarthelmeh:build
Closed

back out sha512 hash type tests and leave only single macro guard in …#369
JacobBarthelmeh wants to merge 1 commit into
wolfSSL:mainfrom
JacobBarthelmeh:build

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

@JacobBarthelmeh JacobBarthelmeh commented May 15, 2026

…DMA section

Reverts CI test from #357

@JacobBarthelmeh JacobBarthelmeh self-assigned this May 15, 2026
Copilot AI review requested due to automatic review settings May 15, 2026 20:04
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 backs out the “build/test SHA-512 without WOLFSSL_SHA512_HASHTYPE” configuration and simplifies SHA-512 test compilation guards, primarily around the DMA-related test paths.

Changes:

  • Remove WOLFSSL_SHA512_HASHTYPE preprocessor guards around SHA-512 async test helpers and their invocation.
  • Remove the NO_SHA512_HASHTYPE Makefile option and the WHTEST_NO_SHA512_HASHTYPE user_settings conditional.
  • Remove the CI workflow job that built/tests DMA with WOLFSSL_SHA512_HASHTYPE disabled.

Reviewed changes

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

File Description
test/wh_test_crypto.c Removes WOLFSSL_SHA512_HASHTYPE gating around SHA-512 async (including DMA) tests.
test/Makefile Deletes the NO_SHA512_HASHTYPE build option and related defines.
test/config/user_settings.h Makes WOLFSSL_SHA512_HASHTYPE unconditional for the test configuration.
.github/workflows/build-and-test.yml Removes the CI job that tested DMA builds without WOLFSSL_SHA512_HASHTYPE.
Comments suppressed due to low confidence (2)

test/wh_test_crypto.c:5031

  • The SHA-512 async test helper is now compiled whenever WOLFSSL_SHA512 is enabled, but it calls wh_Client_Sha512* async APIs that are only compiled when WOLFSSL_SHA512_HASHTYPE is also defined (see src/wh_client_crypto.c guarded by #if defined(WOLFSSL_SHA512) && defined(WOLFSSL_SHA512_HASHTYPE)). This will break builds where SHA-512 is enabled but HASHTYPE is not (notably WOLFSSL_LIB=1 against an installed wolfSSL). Reintroduce a WOLFSSL_SHA512_HASHTYPE guard here (or make the client async APIs available without that macro).

This issue also appears on line 11306 of the same file.

/* Direct exercise of the new async non-DMA SHA512 primitives. */
static int whTest_CryptoSha512Async(whClientContext* ctx, int devId,
                                    WC_RNG* rng)
{
    int       ret = WH_ERROR_OK;

test/wh_test_crypto.c:11310

  • The DMA SHA-512 async test is now gated only by WOLFHSM_CFG_DMA, but the underlying client SHA-512 DMA async APIs are also guarded by WOLFSSL_SHA512_HASHTYPE in src/wh_client_crypto.c. If SHA-512 is enabled without HASHTYPE, this will lead to missing symbols at link time. Consider restoring && defined(WOLFSSL_SHA512_HASHTYPE) (or otherwise ensuring the DMA async APIs are built in that configuration).
#ifdef WOLFHSM_CFG_DMA
    if (ret == WH_ERROR_OK) {
        ret = whTest_CryptoSha512DmaAsync(client, WH_DEV_ID_DMA, rng);
    }
#endif /* WOLFHSM_CFG_DMA */

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

Comment thread test/Makefile
Comment thread .github/workflows/build-and-test.yml
@JacobBarthelmeh JacobBarthelmeh marked this pull request as ready for review May 15, 2026 20:31
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