aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2020-01-15 11:03:52 +0100
committerJakub Jelen <jjelen@redhat.com>2020-01-23 09:48:11 +0100
commit94fe7634e13f4a5299fc78bbc61ee5b32f9c6580 (patch)
treecbf685a33e883c370a0cceacb4203363ee493e19
parent8670fb101bcb2600ae1dac4b9a8f2c3f04aba078 (diff)
downloadlibssh-94fe7634e13f4a5299fc78bbc61ee5b32f9c6580.tar.gz
libssh-94fe7634e13f4a5299fc78bbc61ee5b32f9c6580.tar.xz
libssh-94fe7634e13f4a5299fc78bbc61ee5b32f9c6580.zip
Do not build in internal chacha implementation if gcrypt supports that
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/CMakeLists.txt17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 30629db0..35f130a2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -135,9 +135,6 @@ set(libssh_SRCS
wrapper.c
external/bcrypt_pbkdf.c
external/blowfish.c
- external/chacha.c
- external/poly1305.c
- chachapoly.c
config_parser.c
token.c
pki_ed25519_common.c
@@ -183,6 +180,14 @@ if (WITH_GCRYPT)
external/ge25519.c
external/sc25519.c
)
+ if (NOT HAVE_GCRYPT_CHACHA_POLY)
+ set(libssh_SRCS
+ ${libssh_SRCS}
+ external/chacha.c
+ external/poly1305.c
+ chachapoly.c
+ )
+ endif (NOT HAVE_GCRYPT_CHACHA_POLY)
elseif (WITH_MBEDTLS)
set(libssh_SRCS
${libssh_SRCS}
@@ -197,6 +202,9 @@ elseif (WITH_MBEDTLS)
external/fe25519.c
external/ge25519.c
external/sc25519.c
+ external/chacha.c
+ external/poly1305.c
+ chachapoly.c
)
else (WITH_GCRYPT)
set(libssh_SRCS
@@ -206,6 +214,9 @@ else (WITH_GCRYPT)
ecdh_crypto.c
libcrypto.c
dh_crypto.c
+ external/chacha.c
+ external/poly1305.c
+ chachapoly.c
)
if (NOT HAVE_OPENSSL_ED25519)
set(libssh_SRCS