Skip to content

CMake: fix XMSS wiring and complete LMS/XMSS sub-option parity#10929

Open
Frauschi wants to merge 2 commits into
wolfSSL:masterfrom
Frauschi:xmss_cmake
Open

CMake: fix XMSS wiring and complete LMS/XMSS sub-option parity#10929
Frauschi wants to merge 2 commits into
wolfSSL:masterfrom
Frauschi:xmss_cmake

Conversation

@Frauschi

Copy link
Copy Markdown
Contributor

Problem

The CMake build accepted -DWOLFSSL_XMSS=1 but never emitted WOLFSSL_HAVE_XMSS — neither onto the library compile line nor into the installed options.h. Since every XMSS body is wrapped in #ifdef WOLFSSL_HAVE_XMSS, the option was a no-op: wc_xmss.c compiled empty and consumers saw no XMSS support. LMS had the correct wiring. Autotools (--enable-xmss) was unaffected.

While fixing this, CMake was also missing several LMS sub-options that autotools --enable-lms already supports.

Changes

XMSS (build-break fix)32ab46a

  • CMakeLists.txt — add the missing if (WOLFSSL_XMSS) block (mirroring LMS), plus WOLFSSL_XMSSVERIFYONLY / WOLFSSL_XMSSSMALL sub-options for parity with autotools --enable-xmss=verify-only,small.
  • cmake/options.h.in — expose WOLFSSL_XMSS_VERIFY_ONLY and WOLFSSL_WC_XMSS_SMALL.
  • configure.ac — drop the unused legacy XMSS_VERIFY_ONLY macro (the un-prefixed twin is dead in-tree), so both build systems emit only WOLFSSL_XMSS_VERIFY_ONLY.
  • .github/workflows/cmake.yml — enable WOLFSSL_XMSS in the main CMake CI build (it tested LMS but not XMSS — the blind spot that let this through).

LMS (parity follow-on)f377a54

  • Add the three LMS sub-options CMake lacked: WOLFSSL_LMSVERIFYONLY, WOLFSSL_LMSSMALL, WOLFSSL_LMSSHAKE256 (emitting WOLFSSL_LMS_VERIFY_ONLY, WOLFSSL_WC_LMS_SMALL, WOLFSSL_LMS_SHAKE256), matching autotools --enable-lms=verify-only,small,shake256.

Verification

  • -DWOLFSSL_XMSS=1options.h now emits #define WOLFSSL_HAVE_XMSS; wc_XmssKey_* symbols exported (were absent before).
  • Both verify-only builds drop wc_{Xmss,Lms}Key_Sign/MakeKey, keep Verify — matches autotools.
  • Sub-options don't leak into options.h when their parent (WOLFSSL_XMSS / WOLFSSL_LMS) is off.
  • Generated options.h no longer contains the dead bare XMSS_VERIFY_ONLY.

Downstream

Unblocks wolfPKCS11 #206, whose CMake CI clones wolfSSL master and requires WOLFSSL_HAVE_XMSS.

Frauschi added 2 commits July 16, 2026 11:20
CMake accepted -DWOLFSSL_XMSS=1 but never emitted WOLFSSL_HAVE_XMSS, so
wc_xmss.c compiled empty and options.h advertised no XMSS support. Add the
missing definition block (mirroring LMS) plus WOLFSSL_XMSSVERIFYONLY and
WOLFSSL_XMSSSMALL sub-options for parity with autotools --enable-xmss=
verify-only,small, and expose all three in the generated options.h.

Also enable WOLFSSL_XMSS in the cmake.yml CI build, which tested LMS but
not XMSS -- the blind spot that let this regression through.
CMake wired only the LMS sha256-192 and no-sha256-256 variants, while
autotools --enable-lms also supports verify-only, small and shake256. Add
the three missing sub-options (WOLFSSL_LMSVERIFYONLY, WOLFSSL_LMSSMALL,
WOLFSSL_LMSSHAKE256), emitting WOLFSSL_LMS_VERIFY_ONLY, WOLFSSL_WC_LMS_SMALL
and WOLFSSL_LMS_SHAKE256, and expose them in the generated options.h so the
CMake and autotools LMS configurations match.
@Frauschi Frauschi self-assigned this Jul 16, 2026
@Frauschi

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Jul 16, 2026
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