|
From: Alex M. S. <arc...@us...> - 2010-09-21 17:46:22
|
Update of /cvsroot/nettle/nettle/h In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20419/h Modified Files: globals nettle Log Message: Largely commit James Bursa's changes for SSH support - some slight tweaks to the code in c/wimp which was preventing it building with Norcroft, and I've removed the \!Run wimpslot changes for the time being (I guess I'd like to do something clever based on whether it's Norcroft-built or gcc-built). Doesn't quite seem to work for me as-is (claims to be missing ciphers), but I don't think that's directly caused by anything in this patch. Index: globals =================================================================== RCS file: /cvsroot/nettle/nettle/h/globals,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** globals 2 Apr 2004 06:32:00 -0000 1.89 --- globals 21 Sep 2010 17:46:13 -0000 1.90 *************** *** 12,15 **** --- 12,19 ---- #include "dnslib.h" + #ifdef WITH_SSH + #include <libssh2.h> + #endif + /**** GLOBAL DEFAULT/OPTIONS ***************/ *************** *** 164,167 **** --- 168,181 ---- dns_t *dns; /* handle for dns lookup */ char socket_state; /* state of socket (see nettle.h for states) */ + + #ifdef WITH_SSH + LIBSSH2_SESSION *ssh_session; /* SSH session object (libssh2) */ + LIBSSH2_CHANNEL *ssh_channel; /* SSH channel object (libssh2) */ + unsigned int ssh_negotiate_state; /* SSH negotiation state + see connect_session_ssh() */ + bool ssh_more_read; /* wimp_pollsocket() needs to be called on + this session */ + #endif + char current_fg; /* current foreground colour */ char current_bg; /* current background colour */ Index: nettle =================================================================== RCS file: /cvsroot/nettle/nettle/h/nettle,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** nettle 26 Oct 2003 16:44:51 -0000 1.40 --- nettle 21 Sep 2010 17:46:13 -0000 1.41 *************** *** 14,20 **** #define NETTLE_SESSION_NONE 0 ! #define NETTLE_SESSION_RESOLVE 1 ! #define NETTLE_SESSION_CONNECT 2 ! #define NETTLE_SESSION_CONNECTED 3 #define NETTLE_ESCAPE_NONE 0 --- 14,24 ---- #define NETTLE_SESSION_NONE 0 ! #define NETTLE_SESSION_START 1 ! #define NETTLE_SESSION_PROMPT_USER 2 ! #define NETTLE_SESSION_PROMPT_PASS 3 ! #define NETTLE_SESSION_RESOLVE 4 ! #define NETTLE_SESSION_CONNECT 5 ! #define NETTLE_SESSION_NEGOTIATE 6 ! #define NETTLE_SESSION_CONNECTED 7 #define NETTLE_ESCAPE_NONE 0 *************** *** 138,141 **** --- 142,147 ---- bool nettle_start_taskwindow(const char *cmd); + bool connect_session_ssh(struct session_struct *session); + void write_out_string(struct session_struct *, const char *); void write_out_strings(struct session_struct *, ...); /* term with NUL ptr */ |