aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2017-11-21 16:09:01 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-10-05 12:09:45 +0200
commit3d0c9cc6b5ecf611bf7239560fee03159ab45e35 (patch)
tree5ef03fdc8295a624b828f8dbced15b0a4127262e
parent4d6048ef88ae4fda1b11b390310152740baa22ee (diff)
downloadlibssh-3d0c9cc6b5ecf611bf7239560fee03159ab45e35.tar.gz
libssh-3d0c9cc6b5ecf611bf7239560fee03159ab45e35.tar.xz
libssh-3d0c9cc6b5ecf611bf7239560fee03159ab45e35.zip
tests: Do not test blowfish ciphers with OpenSSH 7.6 and newer
(cherry-picked from commit b92c4996)
-rw-r--r--tests/client/torture_algorithms.c4
-rw-r--r--tests/torture.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/client/torture_algorithms.c b/tests/client/torture_algorithms.c
index dc7b6539..81e0c10a 100644
--- a/tests/client/torture_algorithms.c
+++ b/tests/client/torture_algorithms.c
@@ -151,6 +151,7 @@ static void torture_algorithms_3des_cbc_hmac_sha2_512(void **state) {
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) {
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) {
test_algorithm(*state, "blowfish-cbc", "hmac-sha2-512");
}
+#endif
static void torture_algorithms_zlib(void **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_sha2_256, 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_sha2_256, 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_openssh, setup, teardown),
unit_test_setup_teardown(torture_algorithms_dh_group1,setup,teardown),
diff --git a/tests/torture.c b/tests/torture.c
index f957d51c..ca4be531 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -784,7 +784,11 @@ static void torture_setup_create_sshd_config(void **state)
"\n"
#if (OPENSSH_VERSION_MAJOR == 6 && OPENSSH_VERSION_MINOR >= 7) || (OPENSSH_VERSION_MAJOR >= 7)
"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"
+# else
+ "Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc\n"
+# endif
"KexAlgorithms +diffie-hellman-group1-sha1"
#else
"Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,"