Skip to content

Commit 004f3ff

Browse files
committed
Fix CMake SHE build: add wc_she.c to sources, propagate CMAC/AES_DIRECT defines,
1 parent e6280cd commit 004f3ff

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,9 @@ if(WOLFSSL_SHE STREQUAL "standard" OR WOLFSSL_SHE STREQUAL "extended")
16511651
message(FATAL_ERROR "Cannot use SHE without AES.")
16521652
else()
16531653
list(APPEND WOLFSSL_DEFINITIONS
1654-
"-DWOLFSSL_SHE")
1654+
"-DWOLFSSL_SHE"
1655+
"-DWOLFSSL_CMAC"
1656+
"-DWOLFSSL_AES_DIRECT")
16551657
override_cache(WOLFSSL_CMAC "yes")
16561658
override_cache(WOLFSSL_AESCBC "yes")
16571659
endif()

cmake/functions.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ function(generate_build_flags)
345345
if(WOLFSSL_HPKE OR WOLFSSL_USER_SETTINGS)
346346
set(BUILD_HPKE "yes" PARENT_SCOPE)
347347
endif()
348+
if(WOLFSSL_SHE AND NOT WOLFSSL_SHE STREQUAL "no")
349+
set(BUILD_SHE "yes" PARENT_SCOPE)
350+
endif()
348351

349352
set(BUILD_FLAGS_GENERATED "yes" PARENT_SCOPE)
350353
endfunction()
@@ -1150,6 +1153,10 @@ function(generate_lib_src_list LIB_SOURCES)
11501153
list(APPEND LIB_SOURCES wolfcrypt/src/cryptocb.c)
11511154
endif()
11521155

1156+
if(BUILD_SHE)
1157+
list(APPEND LIB_SOURCES wolfcrypt/src/wc_she.c)
1158+
endif()
1159+
11531160
if(BUILD_PKCS11)
11541161
list(APPEND LIB_SOURCES wolfcrypt/src/wc_pkcs11.c)
11551162
endif()

0 commit comments

Comments
 (0)