diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-08-29 17:20:40 +0200 |
---|---|---|
committer | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-09-30 16:57:39 +0200 |
commit | 0a13045f68932f309e3076c2ab7777230840cb89 (patch) | |
tree | 1be14d96279fbc47afa43e76549a8c51cfba8b23 | |
parent | b56ffd84245cfd08e84e72df4204ac0aa279372b (diff) | |
download | libssh-0a13045f68932f309e3076c2ab7777230840cb89.tar.gz libssh-0a13045f68932f309e3076c2ab7777230840cb89.tar.xz libssh-0a13045f68932f309e3076c2ab7777230840cb89.zip |
cmake: Detect OpenSSL X25519 support
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 0b7f7d2cf7f2b3e1b6d0d9482670821e90dbd598)
-rw-r--r-- | ConfigureChecks.cmake | 4 | ||||
-rw-r--r-- | config.h.cmake | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7b66f1c4..ab5c35a8 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -150,6 +150,10 @@ if (OPENSSL_FOUND) set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) check_symbol_exists(EVP_PKEY_ED25519 "openssl/evp.h" HAVE_OPENSSL_ED25519) + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) + check_symbol_exists(EVP_PKEY_X25519 "openssl/evp.h" HAVE_OPENSSL_X25519) + unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) endif() diff --git a/config.h.cmake b/config.h.cmake index b2f065d8..98a72f65 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -100,6 +100,9 @@ /* Define to 1 if you have OpenSSL with Ed25519 support */ #cmakedefine HAVE_OPENSSL_ED25519 1 +/* Define to 1 if you have OpenSSL with X25519 support */ +#cmakedefine HAVE_OPENSSL_X25519 1 + /*************************** FUNCTIONS ***************************/ /* Define to 1 if you have the `EVP_aes128_ctr' function. */ |