aboutsummaryrefslogtreecommitdiff
path: root/tests/torture.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-10-09 10:11:55 +0200
committerAndreas Schneider <asn@cryptomilk.org>2012-10-09 10:11:55 +0200
commit9fe47da9037182180a92d8e4acc7e5c5b57ffafb (patch)
treec166b82e5faaa13d25ed2d9eddb0fb548cdec91e /tests/torture.c
parent362be13156c7185b6d479bf025f2be57f6c2d0ea (diff)
downloadlibssh-9fe47da9037182180a92d8e4acc7e5c5b57ffafb.tar.gz
libssh-9fe47da9037182180a92d8e4acc7e5c5b57ffafb.tar.xz
libssh-9fe47da9037182180a92d8e4acc7e5c5b57ffafb.zip
torture: Fix keyboard interactive authentication.
Diffstat (limited to 'tests/torture.c')
-rw-r--r--tests/torture.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 448fafef..a75b0a94 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -201,8 +201,7 @@ ssh_session torture_ssh_session(const char *host,
if (password != NULL) {
if (method & SSH_AUTH_METHOD_INTERACTIVE) {
rc = _torture_auth_kbdint(session, password);
- }
- if (method & SSH_AUTH_METHOD_PASSWORD) {
+ } else if (method & SSH_AUTH_METHOD_PASSWORD) {
rc = ssh_userauth_password(session, NULL, password);
}
} else {