Fix configure.ac so --enable-mldsa=verify-only#10923
Open
miyazakh wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ML-DSA (--enable-mldsa=...) option parsing in configure.ac to ensure that operation-only sub-options (e.g., verify-only, verify, sign, make) don’t accidentally result in all ML-DSA security levels being disabled, which previously caused build failures (#error ML-DSA: All levels disabled.).
Changes:
- Adds a post-parse default that enables all ML-DSA levels (44/65/87) when ML-DSA is enabled but no level was explicitly selected.
- Preserves existing behavior when levels are explicitly provided (e.g.,
44,65,87) or when--enable-mldsais used asyes/bare.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
retest this please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
configure.acso--enable-mldsa=verify-only(andverify/sign/makeused alone) no longer disables all ML-DSA security levels.ENABLED_MLDSA_MAKE_KEY/SIGN/VERIFY) but never touched the level flags (ENABLED_MLDSA44/65/87), which are otherwise only set byyes/all/44/65/87. With no level selected, all three levels ended up disabled viaWOLFSSL_NO_ML_DSA_44/65/87, tripping#error ML-DSA: All levels disabled.inwc_mldsa.hand failing the build.--enable-mldsa(bareyes) already behaves.Root cause
configure.ac's ML-DSA option-parsing loop (--enable-mldsa=...) never defaulted the level flags when only an operation keyword (verify-only,verify,sign,make) was given, leavingENABLED_MLDSA44/65/87empty and causing every parameter set to be compiled out.Testing
./configure --enable-mldsa=verify-only && make check./autogen.sh && ./configure --enable-mldsa=verify-only && makecompletes successfully (previously failed with#error ML-DSA: All levels disabled.)./wolfcrypt/test/testwolfcryptpasses, including theML-DSAtest--enable-mldsa=verify,--enable-mldsa=sign,--enable-mldsa=make(each used alone) also configure/build correctly with the fix--enable-mldsa(bare, defaultyes) is unaffected and still enables all levelsoptions.hmacros match the intended verify-only configuration (WOLFSSL_MLDSA_VERIFY_ONLY,WOLFSSL_MLDSA_NO_MAKE_KEY,WOLFSSL_MLDSA_NO_SIGN, all three levels enabled)Checklist