diff options
author | James Housley <jim@thehousleys.net> | 2007-06-12 12:31:10 +0000 |
---|---|---|
committer | James Housley <jim@thehousleys.net> | 2007-06-12 12:31:10 +0000 |
commit | 99e0597c7b74a8be4c85819554b7a1eb447f5ed5 (patch) | |
tree | db63ef2f18e46ba4bcc92eef0f8c310154369433 /lib/urldata.h | |
parent | 3247ac191819a072777ac7277e0ef8a5cd21fd2f (diff) |
Convert Curl_ssh_connect() to run in a state machine for
LIBSSH2_APINO >= 200706012030. More to come...
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 023bc3ca3..83053fbcf 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -406,6 +406,29 @@ struct ftp_conn { ftpstate state; /* always use ftp.c:state() to change state! */ }; +/**************************************************************************** + * SSH unique setup + ***************************************************************************/ +typedef enum { + SSH_STOP, /* do nothing state, stops the state machine */ + SSH_S_STARTUP, /* Session startup */ + SSH_AUTHLIST, + SSH_AUTH_PKEY_INIT, + SSH_AUTH_PKEY, + SSH_AUTH_PASS_INIT, + SSH_AUTH_PASS, + SSH_AUTH_HOST_INIT, + SSH_AUTH_HOST, + SSH_AUTH_KEY_INIT, + SSH_AUTH_KEY, + SSH_AUTH_DONE, + SSH_SFTP_INIT, + SSH_SFTP_REALPATH, + SSH_GET_WORKINGPATH, + SSH_QUIT, + SSH_LAST /* never used */ +} sshstate; + struct SSHPROTO { curl_off_t *bytecountp; char *user; @@ -421,6 +444,17 @@ struct SSHPROTO { #endif /* USE_LIBSSH2 */ }; +/* ssh_conn is used for struct connection-oriented data in the connectdata + struct */ +struct ssh_conn { + const char *authlist; /* List of auth. methods, managed by libssh2 */ + const char *passphrase; + char rsa_pub[PATH_MAX]; + char rsa[PATH_MAX]; + bool authed; + sshstate state; /* always use ssh.c:state() to change state! */ +}; + /**************************************************************************** * FILE unique setup @@ -900,6 +934,7 @@ struct connectdata { union { struct ftp_conn ftpc; + struct ssh_conn sshc; } proto; int cselect_bits; /* bitmask of socket events */ |