aboutsummaryrefslogtreecommitdiff
path: root/tests/client
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-10-04 16:19:20 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-04 16:19:20 +0200
commitda9cd2e64d3a2e884a29fccdacf885468048f445 (patch)
tree3f9a387e49379eb50d624dd6c58141b36f4cf1cd /tests/client
parent5d1636985bd64c0499d9af120622ae7c2bdd83ca (diff)
downloadlibssh-da9cd2e64d3a2e884a29fccdacf885468048f445.tar.gz
libssh-da9cd2e64d3a2e884a29fccdacf885468048f445.tar.xz
libssh-da9cd2e64d3a2e884a29fccdacf885468048f445.zip
Implemented zlib@openssh.com compression
Diffstat (limited to 'tests/client')
-rw-r--r--tests/client/torture_algorithms.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/client/torture_algorithms.c b/tests/client/torture_algorithms.c
index 300fe05..6cd7594 100644
--- a/tests/client/torture_algorithms.c
+++ b/tests/client/torture_algorithms.c
@@ -119,6 +119,25 @@ START_TEST (torture_algorithms_zlib)
}
END_TEST
+START_TEST (torture_algorithms_zlib_openssh)
+{
+ int rc;
+ ssh_options_set(session,SSH_OPTIONS_HOST,"localhost");
+ rc=ssh_options_set(session,SSH_OPTIONS_COMPRESSION_C_S,"zlib@openssh.com");
+ ck_assert_msg(rc==SSH_OK,ssh_get_error(session));
+ 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);
+ 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
+
Suite *torture_make_suite(void) {
Suite *s = suite_create("libssh_algorithms");
@@ -140,5 +159,7 @@ Suite *torture_make_suite(void) {
torture_algorithms_blowfish_cbc, setup, teardown);
torture_create_case_fixture(s, "torture_algorithms_zlib",
torture_algorithms_zlib, setup, teardown);
- return s;
+ torture_create_case_fixture(s, "torture_algorithms_zlib_openssh",
+ torture_algorithms_zlib_openssh, setup, teardown);
+ return s;
}