mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-10-24 04:09:07 +03:00
CMake: add LMS verify-only, small and shake256 sub-options
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.
This commit is contained in:
@@ -1010,6 +1010,18 @@ add_option(WOLFSSL_LMSNOSHA256256
|
||||
"Disable the LMS SHA_256_256 standard variant (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option(WOLFSSL_LMSVERIFYONLY
|
||||
"Enable the LMS/HSS verify-only implementation (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option(WOLFSSL_LMSSMALL
|
||||
"Enable the smaller, slower LMS/HSS implementation (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option(WOLFSSL_LMSSHAKE256
|
||||
"Enable the LMS SHAKE256 variant (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
if (WOLFSSL_LMS)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_HAVE_LMS")
|
||||
|
||||
@@ -1026,6 +1038,24 @@ if (WOLFSSL_LMS)
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_NO_LMS_SHA256_256" RESULT)
|
||||
endif()
|
||||
|
||||
if (WOLFSSL_LMSVERIFYONLY)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_LMS_VERIFY_ONLY")
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_LMS_VERIFY_ONLY" RESULT)
|
||||
endif()
|
||||
|
||||
if (WOLFSSL_LMSSMALL)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_WC_LMS_SMALL")
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_WC_LMS_SMALL" RESULT)
|
||||
endif()
|
||||
|
||||
if (WOLFSSL_LMSSHAKE256)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_LMS_SHAKE256")
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_LMS_SHAKE256" RESULT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Experimental features
|
||||
|
||||
@@ -409,6 +409,12 @@ extern "C" {
|
||||
#cmakedefine WOLFSSL_LMS_SHA256_192
|
||||
#undef WOLFSSL_NO_LMS_SHA256_256
|
||||
#cmakedefine WOLFSSL_NO_LMS_SHA256_256
|
||||
#undef WOLFSSL_LMS_VERIFY_ONLY
|
||||
#cmakedefine WOLFSSL_LMS_VERIFY_ONLY
|
||||
#undef WOLFSSL_WC_LMS_SMALL
|
||||
#cmakedefine WOLFSSL_WC_LMS_SMALL
|
||||
#undef WOLFSSL_LMS_SHAKE256
|
||||
#cmakedefine WOLFSSL_LMS_SHAKE256
|
||||
#undef WOLFSSL_HAVE_XMSS
|
||||
#cmakedefine WOLFSSL_HAVE_XMSS
|
||||
#undef WOLFSSL_WC_XMSS
|
||||
|
||||
Reference in New Issue
Block a user