Skip to content

Allow for FIPS builds without ED25519 & MD5 - #283

Open
lealem47 wants to merge 1 commit into
wolfSSL:mainfrom
lealem47:flexible_features
Open

Allow for FIPS builds without ED25519 & MD5#283
lealem47 wants to merge 1 commit into
wolfSSL:mainfrom
lealem47:flexible_features

Conversation

@lealem47

Copy link
Copy Markdown
Contributor

Goes along with wolfSSL/wolfssl#11144

@lealem47 lealem47 self-assigned this Aug 11, 2026
Copilot AI lite review requested due to automatic review settings August 11, 2026 19:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 wolfCLU’s behavior (and test suite robustness) when building against wolfSSL configurations that omit MD5 and/or ED25519 (e.g., FIPS-focused builds), by returning NOT_COMPILED_IN with clearer messages and having tests skip appropriately instead of failing.

Changes:

  • Added a shared Python test helper to detect NOT_COMPILED_IN via wolfCLU’s "Error returned: -174." reporting and updated select tests to skipTest() when algorithms are not present.
  • Updated MD5-related setup paths (hash/dgst/bench/HMAC) to return NOT_COMPILED_IN and emit consistent “not compiled in” errors when NO_MD5 is enabled.
  • Updated ED25519 verify/sign codepaths to return NOT_COMPILED_IN when ED25519 support is not compiled in.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/wolfclu_test.py Adds NOT_COMPILED_IN constant and not_compiled_in() helper for skipping optional-algorithm tests.
tests/hash/hash-test.py Skips MD5 hash test when MD5 isn’t compiled into wolfSSL.
tests/genkey_sign_ver/genkey-sign-ver-test.py Skips optional key-type generation when wolfSSL reports NOT_COMPILED_IN (e.g., ED25519 omitted).
tests/bench/bench-test.py Skips MD5 benchmark when MD5 isn’t compiled into wolfSSL.
src/tools/clu_funcs.c Adds NO_MD5 handling in HMAC hash selection for MD5.
src/sign-verify/clu_verify.c Returns/logs NOT_COMPILED_IN when ED25519 verify is unavailable; silences unused params in stubs.
src/sign-verify/clu_sign.c Returns NOT_COMPILED_IN for ED25519 sign when unavailable; silences unused params in stub.
src/sign-verify/clu_dgst_setup.c Returns/logs NOT_COMPILED_IN for -md5 selection when NO_MD5.
src/hash/clu_hash_setup.c Returns/logs NOT_COMPILED_IN for md5 shortcut when NO_MD5.
src/benchmark/clu_bench_setup.c Ensures --md5 is recognized even under NO_MD5 so a targeted NOT_COMPILED_IN error can be returned.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tools/clu_funcs.c
Comment on lines +1398 to 1402
#else
wolfCLU_LogError("MD5 not compiled in");
ret = NOT_COMPILED_IN;
#endif
case WC_HASH_TYPE_SHA:
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