diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-08-10 08:57:27 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-08-10 08:59:36 +0200 |
commit | 99f0e45b619dd52886fb49c761b179bf057fee5e (patch) | |
tree | 08ada12ca0746a936f4d9678d5a1aec5e75ee61b /lib | |
parent | 7520f9f1c33e988314a5102000b1e8abc204941d (diff) |
ssh: use the libssh2 agent API conditionally
Commit e351972bc89aa4c brought in the ssh agent support but some uses of
the libssh2 agent API was done unconditionally which wasn't good enough
since that API hasn't always been present.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -939,6 +939,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; case SSH_AUTH_AGENT_LIST: +#ifdef HAVE_LIBSSH2_AGENT_API rc = libssh2_agent_list_identities(sshc->ssh_agent); if(rc == LIBSSH2_ERROR_EAGAIN) @@ -951,9 +952,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_AUTH_AGENT); sshc->sshagent_prev_identity = NULL; } +#endif break; case SSH_AUTH_AGENT: +#ifdef HAVE_LIBSSH2_AGENT_API /* as prev_identity evolves only after an identity user auth finished we can safely request it again as long as EAGAIN is returned here or by libssh2_agent_userauth */ @@ -988,6 +991,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) } else state(conn, SSH_AUTH_KEY_INIT); +#endif break; case SSH_AUTH_KEY_INIT: |