mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
tests: Do not test blowfish ciphers with OpenSSH 7.6 and newer
(cherry-picked from commit b92c4996
)
This commit is contained in:
committed by
Andreas Schneider
parent
4d6048ef88
commit
3d0c9cc6b5
@@ -151,6 +151,7 @@ static void torture_algorithms_3des_cbc_hmac_sha2_512(void **state) {
|
|||||||
test_algorithm(*state, "3des-cbc", "hmac-sha2-512");
|
test_algorithm(*state, "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) {
|
||||||
test_algorithm(*state, "blowfish-cbc", "hmac-sha1");
|
test_algorithm(*state, "blowfish-cbc", "hmac-sha1");
|
||||||
}
|
}
|
||||||
@@ -162,6 +163,7 @@ static void torture_algorithms_blowfish_cbc_hmac_sha2_256(void **state) {
|
|||||||
static void torture_algorithms_blowfish_cbc_hmac_sha2_512(void **state) {
|
static void torture_algorithms_blowfish_cbc_hmac_sha2_512(void **state) {
|
||||||
test_algorithm(*state, "blowfish-cbc", "hmac-sha2-512");
|
test_algorithm(*state, "blowfish-cbc", "hmac-sha2-512");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void torture_algorithms_zlib(void **state) {
|
static void torture_algorithms_zlib(void **state) {
|
||||||
ssh_session session = *state;
|
ssh_session session = *state;
|
||||||
@@ -311,9 +313,11 @@ int torture_run_tests(void) {
|
|||||||
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha1, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha1, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_256, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_256, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_512, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_3des_cbc_hmac_sha2_512, setup, teardown),
|
||||||
|
#if ((OPENSSH_VERSION_MAJOR == 7 && OPENSSH_VERSION_MINOR < 6) || OPENSSH_VERSION_MAJOR <= 6)
|
||||||
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha1, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha1, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_256, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_256, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_512, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_blowfish_cbc_hmac_sha2_512, setup, teardown),
|
||||||
|
#endif
|
||||||
unit_test_setup_teardown(torture_algorithms_zlib, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_zlib, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_zlib_openssh, setup, teardown),
|
unit_test_setup_teardown(torture_algorithms_zlib_openssh, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_algorithms_dh_group1,setup,teardown),
|
unit_test_setup_teardown(torture_algorithms_dh_group1,setup,teardown),
|
||||||
|
@@ -784,7 +784,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,"
|
||||||
|
Reference in New Issue
Block a user