diff options
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 */ |