From a0b84a8cd541e1a5c9d9a1ab12cfa9e4b7f3aa9e Mon Sep 17 00:00:00 2001 From: Anderson Toshiyuki Sasaki Date: Tue, 6 Aug 2019 18:43:21 +0200 Subject: [PATCH] cmake: Detect OpenSSL support for Ed25519 Signed-off-by: Anderson Toshiyuki Sasaki Reviewed-by: Jakub Jelen --- ConfigureChecks.cmake | 4 ++++ config.h.cmake | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 1b2eeca3..7b66f1c4 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -146,6 +146,10 @@ if (OPENSSL_FOUND) check_function_exists(OPENSSL_ia32cap_loc HAVE_OPENSSL_IA32CAP_LOC) + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) + check_symbol_exists(EVP_PKEY_ED25519 "openssl/evp.h" HAVE_OPENSSL_ED25519) + unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) endif() diff --git a/config.h.cmake b/config.h.cmake index 282cf8d2..b2f065d8 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -97,6 +97,9 @@ /* Define to 1 if you have gl_flags as a glob_t sturct member */ #cmakedefine HAVE_GLOB_GL_FLAGS_MEMBER 1 +/* Define to 1 if you have OpenSSL with Ed25519 support */ +#cmakedefine HAVE_OPENSSL_ED25519 1 + /*************************** FUNCTIONS ***************************/ /* Define to 1 if you have the `EVP_aes128_ctr' function. */