Add cmake support for WOLFSSL_CUSTOM_CURVES
This commit is contained in:
parent
1c8f1e6921
commit
a75c73cdef
@ -945,13 +945,29 @@ if(WOLFSSL_ECC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO: - ECC custom curves
|
||||
# - Compressed key
|
||||
# TODO: - Compressed key
|
||||
# - FP ECC, fixed point cache ECC
|
||||
# - ECC encrypt
|
||||
# - PSK
|
||||
# - Single PSK identity
|
||||
|
||||
# ECC custom curves
|
||||
add_option("WOLFSSL_ECCCUSTCURVES"
|
||||
"Enable ECC Custom Curves (default: disabled)"
|
||||
"no" "yes;no;all")
|
||||
|
||||
if(WOLFSSL_ECCCUSTCURVES)
|
||||
if("${WOLFSSL_ECCCUSTCURVES}" STREQUAL "all")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR2")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR3")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_BRAINPOOL")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_KOBLITZ")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_CDH")
|
||||
endif()
|
||||
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_CUSTOM_CURVES")
|
||||
endif()
|
||||
|
||||
# CURVE25519
|
||||
set(WOLFSSL_CURVE25519_SMALL "no")
|
||||
add_option("WOLFSSL_CURVE25519"
|
||||
|
@ -86,6 +86,8 @@ extern "C" {
|
||||
#cmakedefine HAVE_CRL
|
||||
#undef HAVE_CRL_IO
|
||||
#cmakedefine HAVE_CRL_IO
|
||||
#undef WOLFSSL_CUSTOM_CURVES
|
||||
#cmakedefine WOLFSSL_CUSTOM_CURVES
|
||||
#undef HAVE_CURVE25519
|
||||
#cmakedefine HAVE_CURVE25519
|
||||
#undef HAVE_CURVE448
|
||||
@ -368,6 +370,16 @@ extern "C" {
|
||||
#cmakedefine WOLFSSL_WC_KYBER
|
||||
#undef NO_WOLFSSL_STUB
|
||||
#cmakedefine NO_WOLFSSL_STUB
|
||||
#undef HAVE_ECC_SECPR2
|
||||
#cmakedefine HAVE_ECC_SECPR2
|
||||
#undef HAVE_ECC_SECPR3
|
||||
#cmakedefine HAVE_ECC_SECPR3
|
||||
#undef HAVE_ECC_BRAINPOOL
|
||||
#cmakedefine HAVE_ECC_BRAINPOOL
|
||||
#undef HAVE_ECC_KOBLITZ
|
||||
#cmakedefine HAVE_ECC_KOBLITZ
|
||||
#undef HAVE_ECC_CDH
|
||||
#cmakedefine HAVE_ECC_CDH
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user