aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh-libssh.c
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2018-08-14 12:47:18 +0200
committerKamil Dudka <kdudka@redhat.com>2018-08-14 22:08:06 +0200
commita4c7911a48dadb4f68ba6b38bb1bf3f061b747f6 (patch)
tree6be74864b10cf873b377cf178af15c6737756efe /lib/ssh-libssh.c
parent1e843a31a49484aeddf8f358e71392205f5fd6b1 (diff)
ssh-libssh: fix infinite connect loop on invalid private key
Added test 656 (based on test 604) to verify the fix. Bug: https://bugzilla.redhat.com/1595135 Closes #2879
Diffstat (limited to 'lib/ssh-libssh.c')
-rw-r--r--lib/ssh-libssh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index f40f074b9..12d618cfe 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -663,6 +663,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
if(rc != SSH_OK) {
failf(data, "Could not load private key file %s",
data->set.str[STRING_SSH_PRIVATE_KEY]);
+ MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
break;
}