Skip to content

Conversation

@douzzer
Copy link
Contributor

@douzzer douzzer commented Jan 15, 2026

wolfcrypt/test/test.c:

  • tweaks to xmss_test() for compatibility with WOLFSSL_NO_MALLOC && NO_WOLFSSL_MEMORY;
  • fixes for return codes in dilithium_test().

wolfssl/wolfcrypt/dilithium.h: add !WC_NO_CONSTRUCTORS gate around wc_dilithium_new() and wc_dilithium_delete() prototypes, to match gating in implementation.

This PR allows PQC successful testwolfcrypt in the allcryptonly-no-malloc-no-wolf-memory multi-test scenario, which forces all XMALLOC() calls to fail (return NULL).

The passing config is:

$ ./configure --quiet --enable-fips=disabled 'EXTRA_CPPFLAGS=-Werror' '--srcdir' '.' '--disable-jobserver' '--enable-option-checking=fatal' '--enable-all-crypto' '--enable-experimental' '--enable-kyber=yes,original' '--enable-lms' '--enable-xmss' '--enable-dilithium' '--enable-dual-alg-certs' '--disable-qt' '--disable-dual-alg-certs' '--enable-cryptonly' '--disable-pkcs12' '--disable-ecccustcurves' '--disable-brainpool' '--disable-dsa' '--disable-srp' '--disable-scrypt' '--disable-eccsi' '--disable-sakke' '--disable-pkcs7' 'CC=gcc-16' 'LDFLAGS=-g -fno-omit-frame-pointer -fsanitize-recover=all -fsanitize=address,pointer-subtract,leak,undefined,float-cast-overflow,float-divide-by-zero,bounds-strict -fsanitize-recover=all ' 'CFLAGS=-DTEST_ALWAYS_RUN_TO_END -DWC_SIPHASH_NO_ASM -DWC_DEBUG_CIPHER_LIFECYCLE -g -fno-omit-frame-pointer -fsanitize=address,pointer-subtract,leak,undefined,float-cast-overflow,float-divide-by-zero,bounds-strict -fsanitize-recover=all --param=max-vartrack-size=128000000 -DWOLFSSL_NO_MALLOC -DWOLFSSL_SP_NO_MALLOC -DWOLFSSL_SP_NO_DYN_STACK -DNO_WOLFSSL_MEMORY -UHAVE_ECC_KOBLITZ -UWC_DEBUG_CIPHER_LIFECYCLE -DWOLFSSL_XMSS_VERIFY_ONLY -DWOLFSSL_DILITHIUM_VERIFY_NO_MALLOC -DWOLFSSL_DILITHIUM_VERIFY_SMALL_MEM -DWOLFSSL_DILITHIUM_NO_MAKE_KEY'

* tweaks to xmss_test() for compatibility with WOLFSSL_NO_MALLOC && NO_WOLFSSL_MEMORY;
* fixes for return codes in dilithium_test().

wolfssl/wolfcrypt/dilithium.h: add !WC_NO_CONSTRUCTORS gate around wc_dilithium_new() and wc_dilithium_delete() prototypes, to match gating in implementation.
@devin-ai-integration

This comment was marked as spam.

@douzzer
Copy link
Contributor Author

douzzer commented Jan 15, 2026

retest this please

@douzzer
Copy link
Contributor Author

douzzer commented Jan 16, 2026

Note hostap tests are down due to upstream repo server.

@dgarske dgarske assigned wolfSSL-Bot and unassigned SparkiDev Jan 16, 2026
@dgarske dgarske merged commit f587872 into wolfSSL:master Jan 16, 2026
660 of 673 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