Add WOLFSSL_DH_CONST option to Cmake

This commit is contained in:
Eric Blankenhorn 2023-01-20 08:39:44 -06:00
parent 68520e3f0b
commit 9f7e82a081
1 changed files with 7 additions and 2 deletions

View File

@ -931,7 +931,7 @@ endif()
# DH
add_option("WOLFSSL_DH"
"Enable DH (default: enabled)"
"yes" "yes;no")
"yes" "yes;no;const")
if(WOLFSSL_OPENSSH)
override_cache(WOLFSSL_DH "yes")
@ -946,6 +946,11 @@ else()
endif()
endif()
if("${WOLFSSL_DH}" STREQUAL "const")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_DH_CONST")
set(WOLFSSL_DH_CONST "yes")
endif()
# TODO: - Anonymous
# ASN
@ -1949,7 +1954,7 @@ elseif(APPLE)
${SECURITY_FRAMEWORK})
endif()
else()
if(WOLFSSL_DH)
if(WOLFSSL_DH AND NOT WOLFSSL_DH_CONST)
# DH requires math (m) library
target_link_libraries(wolfssl
PUBLIC