aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-05-19 14:07:40 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-05-19 14:07:40 +0200
commit517e58d3dc13b16d6896de2eccc8a28d9604a708 (patch)
treee37ce8159f58b002f156196a00dc818424b042af /tests
parent0eaa650e322014b67fa5e7150e889c39b294a223 (diff)
downloadlibssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.tar.gz
libssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.tar.xz
libssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.zip
Fixed keyboard-interactive and unit test
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/torture_auth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/torture_auth.c b/tests/unittests/torture_auth.c
index af9ddd2..2381d8a 100644
--- a/tests/unittests/torture_auth.c
+++ b/tests/unittests/torture_auth.c
@@ -65,6 +65,11 @@ START_TEST (torture_auth_kbdint)
ck_assert_int_eq(ssh_userauth_kbdint_getnprompts(session),1);
ssh_userauth_kbdint_setanswer(session,0,password);
rc=ssh_userauth_kbdint(session,NULL,NULL);
+ /* Sometimes, SSH server send an empty query at the end of exchange */
+ if(rc==SSH_AUTH_INFO){
+ ck_assert_int_eq(ssh_userauth_kbdint_getnprompts(session),0);
+ rc=ssh_userauth_kbdint(session,NULL,NULL);
+ }
ck_assert_msg(rc==SSH_AUTH_SUCCESS,ssh_get_error(session));
}