aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-12-17 11:22:50 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-12-23 14:45:24 +0100
commitc106cd1f8365c871c798ffac8a384bfcbd48c6df (patch)
tree455356844afac5db0c16a78720d044a7ca38ef75
parent7e692ee1b6f0c78008ad2143174d080a4db4b254 (diff)
downloadlibssh-c106cd1f8365c871c798ffac8a384bfcbd48c6df.tar.gz
libssh-c106cd1f8365c871c798ffac8a384bfcbd48c6df.tar.xz
libssh-c106cd1f8365c871c798ffac8a384bfcbd48c6df.zip
CMakeLists: Shorten the keys lists passed to the ssh command
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 68b045bd..4c67ef51 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -64,7 +64,13 @@ if (SSH_EXECUTABLE)
execute_process(COMMAND ${SSH_EXECUTABLE} -Q kex OUTPUT_VARIABLE OPENSSH_KEX)
execute_process(COMMAND ${SSH_EXECUTABLE} -Q key OUTPUT_VARIABLE OPENSSH_KEYS)
execute_process(COMMAND ${SSH_EXECUTABLE} -Q sig OUTPUT_VARIABLE OPENSSH_SIGS ERROR_QUIET)
+
+ # We need both of them, but lets get rid of duplicate items presented in both lists
+ # to avoid processing too long arguments in pkd
set(OPENSSH_KEYS "${OPENSSH_KEYS}${OPENSSH_SIGS}")
+ string(REPLACE "\n" ";" OPENSSH_KEYS "${OPENSSH_KEYS}")
+ list(REMOVE_DUPLICATES OPENSSH_KEYS)
+ string(REPLACE ";" "\n" OPENSSH_KEYS "${OPENSSH_KEYS}")
endif()
set(SSH_ALGORITHMS