Fixed keyboard-interactive and unit test

This commit is contained in:
Aris Adamantiadis
2010-05-19 14:07:40 +02:00
parent 0eaa650e32
commit 517e58d3dc
3 changed files with 65 additions and 61 deletions

View File

@@ -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));
}