From c106cd1f8365c871c798ffac8a384bfcbd48c6df Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 17 Dec 2019 11:22:50 +0100 Subject: [PATCH] CMakeLists: Shorten the keys lists passed to the ssh command Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- tests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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