diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-19 14:07:40 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-19 14:07:40 +0200 |
commit | 517e58d3dc13b16d6896de2eccc8a28d9604a708 (patch) | |
tree | e37ce8159f58b002f156196a00dc818424b042af /tests/unittests | |
parent | 0eaa650e322014b67fa5e7150e889c39b294a223 (diff) | |
download | libssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.tar.gz libssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.tar.xz libssh-517e58d3dc13b16d6896de2eccc8a28d9604a708.zip |
Fixed keyboard-interactive and unit test
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/torture_auth.c | 5 |
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)); } |