1
1

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>
Этот коммит содержится в:
Jakub Jelen 2019-12-17 11:22:50 +01:00 коммит произвёл Andreas Schneider
родитель 7e692ee1b6
Коммит c106cd1f83

Просмотреть файл

@ -64,7 +64,13 @@ if (SSH_EXECUTABLE)
execute_process(COMMAND ${SSH_EXECUTABLE} -Q kex OUTPUT_VARIABLE OPENSSH_KEX) 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 key OUTPUT_VARIABLE OPENSSH_KEYS)
execute_process(COMMAND ${SSH_EXECUTABLE} -Q sig OUTPUT_VARIABLE OPENSSH_SIGS ERROR_QUIET) 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}") 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() endif()
set(SSH_ALGORITHMS set(SSH_ALGORITHMS