1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

tests: Do not test blowfish ciphers with OpenSSH 7.6 and newer

This commit is contained in:
Jakub Jelen
2017-11-21 16:09:01 +01:00
committed by Andreas Schneider
parent 9fce33a2e3
commit b92c499626
2 changed files with 8 additions and 0 deletions

View File

@ -242,6 +242,7 @@ static void torture_algorithms_3des_cbc_hmac_sha2_512(void **state) {
test_algorithm(s->ssh.session, NULL/*kex*/, "3des-cbc", "hmac-sha2-512"); test_algorithm(s->ssh.session, NULL/*kex*/, "3des-cbc", "hmac-sha2-512");
} }
#if ((OPENSSH_VERSION_MAJOR == 7 && OPENSSH_VERSION_MINOR < 6) || OPENSSH_VERSION_MAJOR <= 6)
static void torture_algorithms_blowfish_cbc_hmac_sha1(void **state) { static void torture_algorithms_blowfish_cbc_hmac_sha1(void **state) {
struct torture_state *s = *state; struct torture_state *s = *state;
@ -259,6 +260,7 @@ static void torture_algorithms_blowfish_cbc_hmac_sha2_512(void **state) {
test_algorithm(s->ssh.session, NULL/*kex*/, "blowfish-cbc", "hmac-sha2-512"); test_algorithm(s->ssh.session, NULL/*kex*/, "blowfish-cbc", "hmac-sha2-512");
} }
#endif
static void torture_algorithms_zlib(void **state) { static void torture_algorithms_zlib(void **state) {
struct torture_state *s = *state; struct torture_state *s = *state;
@ -429,6 +431,7 @@ int torture_run_tests(void) {
cmocka_unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_512, cmocka_unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_512,
session_setup, session_setup,
session_teardown), session_teardown),
#if ((OPENSSH_VERSION_MAJOR == 7 && OPENSSH_VERSION_MINOR < 6) || OPENSSH_VERSION_MAJOR <= 6)
cmocka_unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha1, cmocka_unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha1,
session_setup, session_setup,
session_teardown), session_teardown),
@ -438,6 +441,7 @@ int torture_run_tests(void) {
cmocka_unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_512, cmocka_unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_512,
session_setup, session_setup,
session_teardown), session_teardown),
#endif
cmocka_unit_test_setup_teardown(torture_algorithms_zlib, cmocka_unit_test_setup_teardown(torture_algorithms_zlib,
session_setup, session_setup,
session_teardown), session_teardown),

View File

@ -899,7 +899,11 @@ static void torture_setup_create_sshd_config(void **state)
"\n" "\n"
#if (OPENSSH_VERSION_MAJOR == 6 && OPENSSH_VERSION_MINOR >= 7) || (OPENSSH_VERSION_MAJOR >= 7) #if (OPENSSH_VERSION_MAJOR == 6 && OPENSSH_VERSION_MINOR >= 7) || (OPENSSH_VERSION_MAJOR >= 7)
"HostKeyAlgorithms +ssh-dss\n" "HostKeyAlgorithms +ssh-dss\n"
# if (OPENSSH_VERSION_MAJOR == 7 && OPENSSH_VERSION_MINOR < 6)
"Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc\n" "Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc\n"
# else
"Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc\n"
# endif
"KexAlgorithms +diffie-hellman-group1-sha1" "KexAlgorithms +diffie-hellman-group1-sha1"
#else #else
"Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr," "Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,"