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

test: Added openssh checks to the compression tests.

This commit is contained in:
Andreas Schneider
2010-12-27 22:47:37 +01:00
parent b4c62ac9ea
commit 32c0e1c99a

View File

@ -109,12 +109,15 @@ START_TEST (torture_algorithms_zlib)
rc=ssh_options_set(session,SSH_OPTIONS_COMPRESSION_S_C,"zlib");
ck_assert_msg(rc==SSH_OK,ssh_get_error(session));
rc=ssh_connect(session);
/* Don't run the test against openssh */
if (!ssh_get_openssh_version(session)) {
ck_assert_msg(rc==SSH_OK,ssh_get_error(session));
rc=ssh_userauth_none(session,NULL);
if(rc != SSH_OK){
rc=ssh_get_error_code(session);
ck_assert_msg(rc==SSH_REQUEST_DENIED,ssh_get_error(session));
}
}
ssh_disconnect(session);
}
END_TEST
@ -128,12 +131,15 @@ START_TEST (torture_algorithms_zlib_openssh)
rc=ssh_options_set(session,SSH_OPTIONS_COMPRESSION_S_C,"zlib@openssh.com");
ck_assert_msg(rc==SSH_OK,ssh_get_error(session));
rc=ssh_connect(session);
/* Only run the test against openssh */
if (ssh_get_openssh_version(session)) {
ck_assert_msg(rc==SSH_OK,ssh_get_error(session));
rc=ssh_userauth_none(session,NULL);
if(rc != SSH_OK){
rc=ssh_get_error_code(session);
ck_assert_msg(rc==SSH_REQUEST_DENIED,ssh_get_error(session));
}
}
ssh_disconnect(session);
}
END_TEST