From 517e58d3dc13b16d6896de2eccc8a28d9604a708 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 19 May 2010 14:07:40 +0200 Subject: Fixed keyboard-interactive and unit test --- tests/unittests/torture_auth.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/unittests/torture_auth.c b/tests/unittests/torture_auth.c index af9ddd25..2381d8a9 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)); } -- cgit