SSH: added agent based authentication

CURLSSH_AUTH_AGENT is a new auth type for SSH
This commit is contained in:
Armel Asselin
2012-03-09 17:24:42 +01:00
committed by Daniel Stenberg
parent 021e89b8c6
commit e351972bc8
3 changed files with 121 additions and 3 deletions

View File

@@ -44,6 +44,9 @@ typedef enum {
SSH_AUTH_PKEY,
SSH_AUTH_PASS_INIT,
SSH_AUTH_PASS,
SSH_AUTH_AGENT_INIT,/* initialize then wait for connection to agent */
SSH_AUTH_AGENT_LIST,/* ask for list then wait for entire list to come */
SSH_AUTH_AGENT, /* attempt one key at a time */
SSH_AUTH_HOST_INIT,
SSH_AUTH_HOST,
SSH_AUTH_KEY_INIT,
@@ -139,6 +142,12 @@ struct ssh_conn {
LIBSSH2_SFTP_HANDLE *sftp_handle;
int orig_waitfor; /* default READ/WRITE bits wait for */
#ifdef HAVE_LIBSSH2_AGENT_API
LIBSSH2_AGENT *ssh_agent; /* proxy to ssh-agent/pageant */
struct libssh2_agent_publickey *sshagent_identity,
*sshagent_prev_identity;
#endif
/* note that HAVE_LIBSSH2_KNOWNHOST_API is a define set in the libssh2.h
header */
#ifdef HAVE_LIBSSH2_KNOWNHOST_API