tests: Support other openssh versions ...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
5bb9b570f4
Коммит
6e7eae968a
@ -59,6 +59,14 @@ if (WITH_CLIENT_TESTING)
|
||||
message(SEND_ERROR "Could not find sshd which is required for client testing")
|
||||
endif()
|
||||
|
||||
find_program(SSH_EXECUTABLE NAME ssh)
|
||||
if (SSH_EXECUTABLE)
|
||||
execute_process(COMMAND ${SSH_EXECUTABLE} -V ERROR_VARIABLE OPENSSH_VERSION_STR)
|
||||
string(REGEX REPLACE "^OpenSSH_([0-9]).[0-9].*$" "\\1" OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}")
|
||||
string(REGEX REPLACE "^OpenSSH_[0-9].([0-9]).*$" "\\1" OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}")
|
||||
add_definitions(-DOPENSSH_VERSION_MAJOR=${OPENSSH_VERSION_MAJOR} -DOPENSSH_VERSION_MINOR=${OPENSSH_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
# homedir will be used in passwd
|
||||
set(HOMEDIR ${CMAKE_CURRENT_BINARY_DIR}/home)
|
||||
|
||||
|
@ -98,14 +98,12 @@ static void torture_channel_read_error(void **state) {
|
||||
if (rc == SSH_ERROR)
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* Either this is a change in sshd or socker_wrapper can't detect the
|
||||
* remote fatal disconnect correctly
|
||||
*/
|
||||
#if OPENSSH_VERSION_MAJOR == 6 && OPENSSH_VERSION_MINOR >= 7
|
||||
/* With openssh 6.7 this doesn't produce and error anymore */
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
#else
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
#endif
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
|
||||
ssh_channel_free(channel);
|
||||
}
|
||||
|
@ -904,9 +904,22 @@ static void torture_setup_create_sshd_config(void **state)
|
||||
"UsePrivilegeSeparation no\n"
|
||||
"StrictModes no\n"
|
||||
"\n"
|
||||
"Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc\n"
|
||||
"KexAlgorithms +diffie-hellman-group1-sha1\n"
|
||||
#if OPENSSH_VERSION_MAJOR == 6 && OPENSSH_VERSION_MINOR >= 7
|
||||
"HostKeyAlgorithms +ssh-dss\n"
|
||||
"Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc\n"
|
||||
"KexAlgorithms +diffie-hellman-group1-sha1"
|
||||
#else
|
||||
"Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,"
|
||||
"aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,"
|
||||
"aes256-gcm@openssh.com,arcfour128,arcfour256,arcfour,"
|
||||
"blowfish-cbc,cast128-cbc,chacha20-poly1305@openssh.com\n"
|
||||
"KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,"
|
||||
"ecdh-sha2-nistp384,ecdh-sha2-nistp521,"
|
||||
"diffie-hellman-group-exchange-sha256,"
|
||||
"diffie-hellman-group-exchange-sha1,"
|
||||
"diffie-hellman-group14-sha1,"
|
||||
"diffie-hellman-group1-sha1\n"
|
||||
#endif
|
||||
"\n"
|
||||
"AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES\n"
|
||||
"AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT\n"
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user